/* ============================================================
   CSACEFA Portal – Stylesheet v3
   Design: Bootstrap card layout matching supplied reference.
   Brand colour: #005552 (teal/green)
   ============================================================ */

/* ── Registration & login container ────────────────────────── */
.csacefa-reg-container {
  padding-top: 48px;
  padding-bottom: 64px;
}

/* ── Card ───────────────────────────────────────────────────── */
.register-card {
  max-width: 850px;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  border: none;
}

/* ── Section blocks inside the form ────────────────────────── */
.form-section {
  border-bottom: 1px solid #eee;
  padding-bottom: 28px;
  margin-bottom: 28px;
}
.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: #005552;
  margin-bottom: 6px;
}

.section-note {
  font-size: 13px;
  color: #666;
  margin-bottom: 18px;
  background: #f0faf9;
  border-left: 3px solid #005552;
  padding: 10px 14px;
  border-radius: 0 4px 4px 0;
}

/* ── Form controls — override Bootstrap defaults slightly ───── */
#csacefa-portal-wrap .form-control,
#csacefa-portal-wrap .form-select {
  border-radius: 6px;
  border: 1px solid #ced4da;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
}
#csacefa-portal-wrap .form-control:focus,
#csacefa-portal-wrap .form-select:focus {
  border-color: #005552;
  box-shadow: 0 0 0 3px rgba(0,85,82,.12);
  outline: none;
}
#csacefa-portal-wrap .form-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}
#csacefa-portal-wrap .form-text {
  font-size: 12px;
  color: #888;
}

/* ── Register / submit button ───────────────────────────────── */
.btn-register {
  background: #005552;
  color: white;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  font-size: 15px;
  transition: background .2s, transform .15s;
  letter-spacing: .3px;
}
.btn-register:hover,
.btn-register:focus {
  background: #003f3f;
  color: #fff;
  transform: translateY(-1px);
}
.btn-register:active { transform: translateY(0); }
.btn-register:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* ── Link colour ────────────────────────────────────────────── */
#csacefa-portal-wrap a { color: #005552; }
#csacefa-portal-wrap a:hover { color: #003f3f; text-decoration: underline; }

/* ── Region hint box that slides in ───────────────────────────
   Shows the states belonging to the selected region.          */
#region-hint-col { display: flex; align-items: center; }
.region-hint-box {
  background: #f0faf9;
  border: 1px solid #b2dbd9;
  border-left: 4px solid #005552;
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13px;
  color: #005552;
  width: 100%;
}
.region-hint-box strong { display: block; margin-bottom: 3px; font-size: 14px; }

/* ── Cover note character count ─────────────────────────────── */
.cover-char-count { font-variant-numeric: tabular-nums; transition: color .2s; }
.cover-char-count.good { color: #1a7a40 !important; font-weight: 600; }
.cover-char-count.warn { color: #e67e22 !important; font-weight: 600; }

/* ── Alert top banner ───────────────────────────────────────── */
.csacefa-alert-top {
  border-radius: 0;
  margin-bottom: 0;
  border-left: none;
  border-right: none;
  border-top: none;
}

/* ── Login card logo emblem ─────────────────────────────────── */
.login-emblem {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #005552;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-family: Georgia, serif;
}

/* ── Password toggle button ─────────────────────────────────── */
.pwd-toggle { background: none; border: 1px solid #ced4da; cursor: pointer; }
.pwd-toggle:hover { background: #f8f9fa; }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD — kept from previous version, scoped cleanly
   ══════════════════════════════════════════════════════════════ */
.csacefa-dashboard {
  max-width: 960px;
  margin: 32px auto 80px;
  padding: 0 16px;
}

.dash-header {
  background: #005552;
  color: #fff;
  padding: 20px 28px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.dash-welcome { display: flex; align-items: center; gap: 14px; }
.dash-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  color: #005552;
  font-size: 22px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.dash-welcome h2 { font-size: 19px; font-weight: 700; margin: 0; color: #fff; }
.dash-welcome p  { font-size: 12px; color: rgba(255,255,255,.65); margin: 2px 0 0; }

.dash-meta { font-size: 12px; color: rgba(255,255,255,.65); display: flex; align-items: center; gap: 8px; margin-top: 3px; }

.btn-logout {
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 5px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  text-decoration: none;
  transition: background .2s;
}
.btn-logout:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }

/* Progress stepper */
.csacefa-progress {
  display: flex;
  align-items: flex-start;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  padding: 18px 20px;
  overflow-x: auto;
}
.progress-step { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; gap: 5px; min-width: 60px; }
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: #e9ecef; color: #aaa;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid transparent; transition: all .2s;
}
.step-label { font-size: 9px; color: #aaa; text-align: center; max-width: 58px; line-height: 1.3; }
.progress-line { flex: 1; min-width: 14px; height: 2px; background: #e9ecef; margin-top: 14px; flex-shrink: 0; transition: background .2s; }
.progress-step.done .step-dot   { background: #005552; color: #fff; border-color: #005552; }
.progress-step.done .step-label { color: #005552; }
.progress-line.done              { background: #005552; }
.progress-step.active .step-dot {
  background: #f4c542; color: #003f3f; border-color: #005552;
  box-shadow: 0 0 0 3px rgba(0,85,82,.18);
}
.progress-step.active .step-label { color: #005552; font-weight: 600; }

/* Tabs */
.dash-tabs {
  display: flex;
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  overflow-x: auto;
}
.dash-tab {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  transition: color .2s, border-color .2s;
}
.dash-tab:hover { color: #005552; text-decoration: none; }
.dash-tab.active { color: #005552; border-bottom-color: #005552; font-weight: 700; }

/* Sections */
.dash-section {
  background: #fff;
  border: 1px solid #dee2e6;
  border-top: none;
  padding: 26px 28px;
}
.dash-section h3 {
  font-size: 18px; font-weight: 700; color: #005552;
  border-bottom: 2px solid #e8f5f5;
  padding-bottom: 10px; margin-bottom: 16px;
}
.section-hint { font-size: 13px; color: #666; margin-bottom: 18px; }

/* Status grid */
.status-grid { display: grid; grid-template-columns: 155px 1fr; gap: 0 12px; }
.status-grid dt { font-size: 13px; color: #666; padding: 7px 0; border-bottom: 1px solid #f4f4f4; }
.status-grid dd { font-size: 14px; font-weight: 500; padding: 7px 0; border-bottom: 1px solid #f4f4f4; }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; letter-spacing: .2px; }
.badge.green  { background: #e8f8ef; color: #1a7a40; }
.badge.orange { background: #fff8e7; color: #9a6500; }
.badge.red    { background: #fdf0ee; color: #c0392b; }
.badge.blue   { background: #eef4fd; color: #1a4a8c; }
.badge.grey   { background: #f0f0f0; color: #666; }
.region-badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  background: #005552; color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
}

/* Shared form elements inside dashboard */
.csacefa-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 16px; }
.form-row.two-col > * { flex: 1; min-width: 0; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: #333; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
  background: #fff;
  width: 100%;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #005552;
  box-shadow: 0 0 0 3px rgba(0,85,82,.10);
}
.form-group input:disabled { background: #f8f9fa; color: #888; cursor: not-allowed; }
.form-group textarea { resize: vertical; min-height: 80px; }
.required { color: #c0392b; margin-left: 2px; }
.optional  { font-weight: 400; color: #888; font-size: 12px; }
.form-section-title { font-size: 12px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 1px; padding-bottom: 8px; border-bottom: 1px solid #eee; margin-bottom: 4px; }

/* Upload box */
.upload-box { border: 2px dashed #ced4da; border-radius: 6px; transition: border-color .2s; }
.upload-box:hover { border-color: #005552; }
.upload-box input[type="file"] { position: absolute; opacity: 0; width: 1px; height: 1px; overflow: hidden; }
.upload-label { display: flex; flex-direction: column; align-items: center; padding: 22px 16px; cursor: pointer; gap: 4px; text-align: center; }
.upload-icon { font-size: 22px; }
.upload-label span { font-size: 13px; color: #666; }
.upload-hint { font-size: 11px !important; color: #bbb !important; }
.upload-box.small .upload-label { padding: 12px; flex-direction: row; gap: 8px; }

/* Buttons */
.btn-primary {
  background: #005552; color: #fff;
  border: none; padding: 10px 24px;
  border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #003f3f; transform: translateY(-1px); }
.btn-primary.btn-full { width: 100%; }
.btn-sm { padding: 6px 14px !important; font-size: 13px !important; }
.btn-ghost {
  background: none; border: 1.5px solid #005552; color: #005552;
  padding: 9px 18px; border-radius: 6px; font-size: 14px; cursor: pointer;
  transition: background .2s; margin-left: 10px;
}
.btn-ghost:hover { background: #f0faf9; }
.form-actions { padding-top: 8px; }
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 44px; }
.pwd-wrap .pwd-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-size: 16px; opacity: .5; transition: opacity .2s;
}
.pwd-wrap .pwd-toggle:hover { opacity: 1; }

/* Payment info */
.payment-info-box {
  background: #f0faf9; border: 1px solid #b2dbd9;
  border-left: 4px solid #005552; border-radius: 6px; padding: 18px 22px; margin-bottom: 22px;
}
.payment-info-box h4 { font-size: 16px; color: #005552; margin-bottom: 12px; font-weight: 700; }
.payment-details { display: grid; grid-template-columns: 145px 1fr; gap: 4px 12px; }
.payment-details dt { font-size: 13px; color: #666; padding: 4px 0; }
.payment-details dd { font-size: 14px; padding: 4px 0; }
.payment-hint { font-size: 13px; color: #666; margin-top: 10px; }

/* Certificate */
.cert-section { text-align: center; padding: 40px 28px !important; background: linear-gradient(135deg,#f0faf9,#fff) !important; }
.cert-icon { font-size: 50px; margin-bottom: 12px; }
.cert-section h3 { font-size: 22px !important; border: none !important; }
.cert-code {
  display: inline-block; background: #005552; color: #fff;
  font-family: 'Courier New', monospace; font-size: 20px; letter-spacing: 4px;
  padding: 13px 26px; border-radius: 6px; margin: 18px auto;
}
.cert-date { font-size: 13px; color: #666; margin-bottom: 18px; }

/* Events */
.events-section { padding-top: 18px !important; }
.events-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.events-header h3 { border: none !important; padding: 0 !important; margin: 0; }
#post-event-form { background: #f8fffe; border: 1px solid #b2dbd9; border-radius: 6px; padding: 18px 22px; margin-bottom: 22px; }
.event-form { gap: 12px !important; }
.events-empty { text-align: center; padding: 36px 20px; color: #888; }
.empty-icon { font-size: 38px; margin-bottom: 10px; }
.events-feed { display: flex; flex-direction: column; gap: 18px; }
.event-card { background: #fff; border: 1px solid #dee2e6; border-radius: 8px; padding: 18px 20px; transition: box-shadow .2s; }
.event-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.event-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.event-avatar { width: 36px; height: 36px; border-radius: 50%; background: #005552; color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.event-meta strong { font-size: 14px; color: #005552; }
.event-org { font-size: 12px; color: #888; }
.event-date-posted { font-size: 11px; color: #aaa; margin-top: 2px; }
.event-title { font-size: 17px; font-weight: 700; color: #222; margin-bottom: 5px; }
.event-when-where { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: #888; margin-bottom: 8px; }
.event-description { font-size: 14px; color: #444; line-height: 1.7; }
.event-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 7px; margin-top: 12px; }
.event-photo-thumb { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; border: 1px solid #dee2e6; }
.event-photo-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.event-photo-thumb:hover img { transform: scale(1.06); }

/* Profile tab */
.profile-grid { display: grid; grid-template-columns: 170px 1fr; gap: 0; }
.profile-grid dt { font-size: 13px; font-weight: 600; color: #666; padding: 8px 0; border-bottom: 1px solid #f4f4f4; }
.profile-grid dd { font-size: 14px; padding: 8px 0; border-bottom: 1px solid #f4f4f4; }
.doc-link { display: inline-block; background: #f4f7fb; border: 1px solid #dee2e6; border-radius: 4px; padding: 3px 8px; font-size: 12px; margin: 2px 4px 2px 0; text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
  .register-card .card-body { padding: 28px 20px !important; }
  .csacefa-dashboard { padding: 0 0 60px; }
  .dash-section { padding: 16px 14px; }
  .status-grid { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .form-row.two-col { flex-direction: column; }
}
