/* ============================================================
   CFEx Training Portal — app.css
   ============================================================ */

:root {
  --bg:          #f5f4f0;
  --surface:     #ffffff;
  --border:      #e2e0d8;
  --border-strong: #c8c6bc;
  --text:        #1a1a18;
  --text-muted:  #6b6a65;
  --text-hint:   #9b9a95;
  --accent:      #534AB7;
  --accent-bg:   #EEEDFE;
  --accent-text: #3C3489;
  --success-bg:  #E1F5EE;
  --success-text:#085041;
  --error-bg:    #FCEBEB;
  --error-text:  #791F1F;
  --radius:      8px;
  --radius-lg:   12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Auth layout ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}

.auth-logo {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.logo-mark {
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.logo-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.auth-title {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}

.auth-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

.auth-footer a:hover { text-decoration: underline; }

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

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

.optional {
  font-weight: 400;
  color: var(--text-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  padding: 9px 12px;
  font-size: 15px;
  border: 0.5px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(83,74,183,.12);
}

/* ---- OTP digit inputs ---- */
.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}

.otp-digit {
  width: 48px !important;
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 500;
  padding: 0 !important;
  border-radius: var(--radius) !important;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 0.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}

.btn:hover { background: var(--bg); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-text); border-color: var(--accent-text); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg); }

.btn-sm { padding: 5px 12px; font-size: 13px; }

.btn-block { width: 100%; }

/* ---- Alerts ---- */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  border: 0.5px solid #F7C1C1;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 0.5px solid #9FE1CB;
}

/* ---- Top nav ---- */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 56px;
  background: var(--surface);
  border-bottom: 0.5px solid var(--border);
}

.nav-brand { text-decoration: none; }

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

.nav-name {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Container ---- */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}
