/* ============================================================
   style.css — NCC Recruitment Portal
   Custom styles layered on top of Tailwind CDN
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
  --ncc-navy:       #0f2d4a;
  --ncc-navy-mid:   #1a3c5e;
  --ncc-navy-light: #2a5278;
  --ncc-gold:       #c9a84c;
  --ncc-gold-light: #e8c96e;
  --ncc-gold-pale:  #fdf6e3;
  --ncc-surface:    #f7f9fc;
  --ncc-border:     #dde4ed;
  --ncc-text:       #1a2535;
  --ncc-muted:      #6b7a90;
  --ncc-success:    #0e7c4a;
  --ncc-success-bg: #e8f7f0;
  --ncc-danger:     #b91c1c;
  --ncc-danger-bg:  #fef2f2;
  --ncc-warning:    #92400e;
  --ncc-warning-bg: #fffbeb;
  --ncc-info:       #1a3c5e;
  --ncc-info-bg:    #e8f0f8;
  --shadow-sm:      0 1px 3px rgba(15,45,74,0.08), 0 1px 2px rgba(15,45,74,0.05);
  --shadow-md:      0 4px 12px rgba(15,45,74,0.10), 0 2px 4px rgba(15,45,74,0.06);
  --shadow-lg:      0 10px 30px rgba(15,45,74,0.14), 0 4px 8px rgba(15,45,74,0.08);
  --radius:         10px;
  --radius-lg:      16px;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Sora', sans-serif;
  background-color: var(--ncc-surface);
  color: var(--ncc-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── NCC Auth Pages (login, register, forgot, reset) ───────── */
.auth-bg {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15,45,74,0.96) 0%, rgba(26,60,94,0.92) 60%, rgba(42,82,120,0.88) 100%),
    url('assets/pattern.svg') center/300px repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.auth-header {
  background: var(--ncc-navy);
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.auth-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--ncc-gold);
  margin: 12px auto 0;
  border-radius: 2px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--ncc-navy);
  letter-spacing: -1px;
}

.auth-header h1 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.03em;
}

.auth-header p {
  color: rgba(255,255,255,0.6);
  font-size: 0.78rem;
  margin: 4px 0 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-body {
  padding: 2rem;
}

/* ── Form Elements ────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ncc-text);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.form-label span.required {
  color: var(--ncc-danger);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--ncc-border);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  color: var(--ncc-text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--ncc-navy-light);
  box-shadow: 0 0 0 3px rgba(26,60,94,0.1);
}

.form-input::placeholder {
  color: #b0bac8;
}

.form-input.error {
  border-color: var(--ncc-danger);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.08);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--ncc-muted);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--ncc-danger);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--ncc-navy);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
  transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--ncc-navy-light);
  box-shadow: 0 4px 12px rgba(15,45,74,0.25);
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  padding: 0.7rem 1.5rem;
  background: transparent;
  color: var(--ncc-navy);
  border: 1.5px solid var(--ncc-navy);
  border-radius: var(--radius);
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: block;
  text-decoration: none;
}

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

/* ── Alert / Flash Messages ───────────────────────────────── */
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}

.alert-success {
  background: var(--ncc-success-bg);
  color: var(--ncc-success);
  border: 1px solid #a7f3d0;
}

.alert-danger {
  background: var(--ncc-danger-bg);
  color: var(--ncc-danger);
  border: 1px solid #fecaca;
}

.alert-warning {
  background: var(--ncc-warning-bg);
  color: var(--ncc-warning);
  border: 1px solid #fde68a;
}

.alert-info {
  background: var(--ncc-info-bg);
  color: var(--ncc-info);
  border: 1px solid #bfdbfe;
}

/* ── Dividers & Links ─────────────────────────────────────── */
.auth-divider {
  text-align: center;
  font-size: 0.82rem;
  color: var(--ncc-muted);
  margin: 1.2rem 0 0;
}

.auth-link {
  color: var(--ncc-navy-light);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.auth-link:hover {
  border-bottom-color: var(--ncc-navy-light);
}

/* ── Step indicator for registration ─────────────────────── */
.step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--ncc-border);
  z-index: 0;
}

.step-item.done::after,
.step-item.active::after {
  background: var(--ncc-navy);
}

.step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ncc-border);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ncc-muted);
  z-index: 1;
  transition: all 0.2s;
}

.step-item.active .step-circle {
  border-color: var(--ncc-navy);
  background: var(--ncc-navy);
  color: #fff;
}

.step-item.done .step-circle {
  border-color: var(--ncc-success);
  background: var(--ncc-success);
  color: #fff;
}

.step-label {
  font-size: 0.65rem;
  color: var(--ncc-muted);
  font-weight: 500;
  text-align: center;
}

.step-item.active .step-label {
  color: var(--ncc-navy);
  font-weight: 600;
}

/* ── Password toggle ──────────────────────────────────────── */
.input-wrap {
  position: relative;
}

.input-wrap .form-input {
  padding-right: 2.8rem;
}

.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ncc-muted);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-toggle:hover { color: var(--ncc-navy); }

/* ── Monospace for reg/service numbers ───────────────────── */
.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

/* ── Loading spinner ──────────────────────────────────────── */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 520px) {
  .auth-body { padding: 1.5rem; }
  .auth-header { padding: 1.5rem; }
}
