:root {
    --brand-navy: #0B2246;
    --brand-navy-light: #16335F;
    --brand-gold: #C68A00;
    --bg-main: #F4F6F9;
    --surface-card: rgba(255, 255, 255, 0.92);
    --border-color: rgba(203, 213, 225, 0.8);
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-white: #FFFFFF;
    --radius-md: 18px;
    --shadow-soft: 0 20px 40px -15px rgba(11, 34, 70, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Animated Background Canvas */
.bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #F8FAFC 0%, #E2E8F0 100%);
}

.bg-canvas::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(11, 34, 70, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.7;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
    animation: float 14s infinite ease-in-out alternate;
}

.blob-1 { width: 380px; height: 380px; background: var(--brand-navy); top: -100px; left: -100px; }
.blob-2 { width: 320px; height: 320px; background: var(--brand-gold); bottom: -80px; right: -80px; animation-delay: -5s; }
.blob-3 { width: 250px; height: 250px; background: #38BDF8; top: 40%; right: 15%; animation-delay: -9s; opacity: 0.25; }

@keyframes float {
    0% { transform: translate(0px, 0px) scale(1); }
    50% { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Main Container Card */
.auth-card {
    background: var(--surface-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 460px;
    padding: 36px 30px;
    position: relative;
    z-index: 10;
}

/* Shared Brand Header */
.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    text-decoration: none;
    margin-bottom: 14px;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-navy);
    border: 2px solid var(--brand-gold);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* ==========================================
   PUBLIC FORM LAYOUT & INPUT STYLING
   ========================================== */

/* Form Group Container */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Form Labels */
.form-label {
    display: block;
    font-size: var(--font-xs);
    font-weight: 700;
    color: var(--brand-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Input Wrapper & Icons */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 2;
}

/* Form Inputs (Django Default Render Included) */
.form-input, 
.input-wrapper input[type="text"],
.input-wrapper input[type="email"],
.input-wrapper input[type="password"],
.input-wrapper input[type="tel"],
.input-wrapper select {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    padding: 12px 14px 12px 42px;
    border-radius: var(--radius-sm);
    font-size: var(--font-sm);
    color: var(--text-main);
    font-weight: 600;
    outline: none;
    transition: all 0.2s ease-in-out;
}

.form-input:focus, 
.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--brand-gold);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(198, 138, 0, 0.18);
}

/* Toggle Password Eye Icon Button */
.toggle-password-btn {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 2;
}

/* ==========================================
   INLINE ERROR MESSAGES & INVALID STATES
   ========================================== */

/* Red Border Outline for Invalid Inputs */
.is-invalid {
    border-color: #DC2626 !important;
    background-color: #FEF2F2 !important;
}

.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
}

/* Floating Inline Error Box (Beneath Input) */
.invalid-feedback {
    display: none;
    color: #DC2626;
    background-color: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Global Alert Box (for non-field errors) */
.alert-error-container {
    background: #FEF2F2;
    border: 1px solid #DC2626;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
    color: #DC2626;
    font-size: var(--font-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}



/* Container Box */
.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 18px;
  box-shadow: 0 20px 40px -15px rgba(11, 34, 70, 0.12);
  padding: 36px 30px;
  max-width: 440px;
  margin: 0 auto;
}

/* Typography & Titles */
.auth-card h4.font-24 {
  font-size: 22px;
  font-weight: 800;
  color: #0B2246;
  text-align: center;
  margin-bottom: 6px;
}

.auth-card p.mb-30 {
  font-size: 14px;
  color: #475569;
  text-align: center;
  margin-bottom: 24px;
}

/* Form Structure & Labels */
.auth-card form p {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.auth-card label[for="id_email"] {
  font-size: 12px;
  font-weight: 700;
  color: #0B2246;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

/* Input Field Styling via Class & ID */
.auth-card .form-control,
.auth-card #id_email {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(203, 213, 225, 0.8);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: #0F172A;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: none;
}

.auth-card .form-control:focus,
.auth-card #id_email:focus {
  border-color: #C68A00;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(198, 138, 0, 0.18);
}

/* Submit Button Styling */
.auth-card .btn-primary {
  width: 100%;
  height: 48px;
  background: #0B2246;
  border: none;
  border-radius: 10px;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
  box-shadow: 0 4px 12px rgba(11, 34, 70, 0.15);
}

.auth-card .btn-primary:hover {
  background: #16335F;
  transform: translateY(-1px);
}

/* Bottom Navigation Link */
.auth-card .text-primary {
  color: #C68A00;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
}

.auth-card .text-primary:hover {
  text-decoration: underline;
}





.brand-icon i { color: var(--brand-gold); fill: var(--brand-gold); }

.logo-text .text-go { color: var(--brand-navy); }
.logo-text .text-scribe { color: var(--brand-gold); }
.logo-text .text-24 { color: var(--brand-navy); }
