:root {
    --safta-navy: #0b2c6b;
    --safta-red: #d31018;
    --light-bg: #f8fafc;
    --card-bg: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

body:not(.home-body) {
    align-items: center;
    padding-top: 80px;
}

.container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* ==========================================
   NAVBAR & LOGO
   ========================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--safta-navy);
    text-decoration: none;
}

.nav-logo-img {
    height: 45px;
    width: auto;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 22px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-login {
    color: var(--safta-navy);
}

.nav-login:hover {
    background-color: #f1f5f9;
}

.nav-register {
    background-color: var(--safta-navy);
    color: white;
}

.nav-register:hover {
    background-color: #061c47;
    transform: translateY(-1px);
}

/* Logo inside cards */
.card-logo {
    width: 90px;
    height: auto;
    margin-bottom: 15px;
    border-radius: 50%;
}

/* ==========================================
   HOME PAGE
   ========================================== */
.home-body {
    background: radial-gradient(circle at top, #eef2f8 0%, #dbe4f0 100%);
}

.home-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.home-content {
    max-width: 850px;
    padding: 80px 20px 60px 20px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.home-logo {
    width: 160px;
    height: auto;
    margin-bottom: 25px;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.eyebrow {
    color: var(--safta-red);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.home-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    color: var(--safta-navy);
    margin-bottom: 20px;
}

.home-content .subtitle {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 40px;
}

.home-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.home-cta .btn-red, 
.home-cta .btn-outline {
    padding: 16px 32px;
    font-size: 1.05rem;
    border-radius: 8px;
    width: auto;
}

.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 80px auto;
    padding: 0 20px;
    width: 100%;
}

.info-card {
    background: var(--card-bg);
    padding: 35px 30px;
    border-radius: 12px;
    border-top: 5px solid var(--safta-navy);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    color: var(--safta-navy);
    margin-bottom: 15px;
}

/* ==========================================
   REGISTRATION & PROFILE CARDS
   ========================================== */
.registration-card, .profile-card {
    background: var(--card-bg);
    width: 100%;
    max-width: 650px;
    padding: 45px 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(11, 44, 107, 0.08);
    border-top: 6px solid var(--safta-navy);
    border-bottom: 3px solid var(--safta-red);
    animation: fadeIn 0.6s ease-out;
}

.header-section {
    text-align: center;
    margin-bottom: 30px;
}

.header-section h1 {
    color: var(--safta-navy);
    font-size: 1.85rem;
    font-weight: 800;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--safta-navy);
    margin-bottom: 6px;
}

.form-group input, 
.form-group select {
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    background-color: #f9fafb;
}

.form-group input:focus, 
.form-group select:focus {
    border-color: var(--safta-navy);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(11, 44, 107, 0.1);
}

/* ==========================================
   PROFILE DETAILS GRID
   ========================================== */
.profile-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    background: #f8fafc;
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-item span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-item strong {
    font-size: 1rem;
    color: var(--safta-navy);
    word-break: break-word;
}

/* ==========================================
   BUTTONS & ALERTS
   ========================================== */
.register-btn, .btn-red {
    width: 100%;
    background-color: var(--safta-navy);
    color: #ffffff;
    border: none;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid var(--safta-red);
}

.register-btn:hover, .btn-red:hover {
    background-color: #061c47;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-outline {
    flex: 1;
    border: 1.5px solid var(--safta-navy);
    color: var(--safta-navy);
    padding: 13px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s ease;
}

.btn-outline:hover {
    background-color: var(--safta-navy);
    color: #ffffff;
}

.welcome-banner {
    display: none;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.welcome-banner.error {
    display: block;
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #f87171;
}

.welcome-banner.success {
    display: block;
    background-color: #dcfce7;
    color: #15803d;
    border: 1px solid #4ade80;
}

.footnote {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.footnote a {
    color: var(--safta-navy);
    font-weight: 700;
    text-decoration: none;
}

.footnote a:hover {
    text-decoration: underline;
}

/* ==========================================
   PREMIUM SPLIT-PANEL AUTH CARD (LOGIN)
   ========================================== */
.auth-card {
    display: flex;
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(11, 44, 107, 0.15);
    overflow: hidden;
    min-height: 500px;
    animation: fadeIn 0.6s ease-out;
}

.auth-side-panel {
    flex: 1;
    background: linear-gradient(135deg, var(--safta-navy) 0%, #061c47 100%);
    color: white;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Adds a subtle red accent line to the side panel */
.auth-side-panel::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background-color: var(--safta-red);
}

.auth-side-content {
    position: relative;
    z-index: 2;
}

/* FIXED: Reduced size of the side panel logo */
.auth-side-logo {
    width: 85px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    border: 3px solid rgba(255,255,255,0.1);
}

.auth-side-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
}

.auth-side-content p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.auth-form-panel {
    flex: 1.2;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* FIXED: Reduced size of the logo above the form */
.auth-form-panel .card-logo {
    width: 65px;
    height: auto;
    margin-bottom: 15px;
}

/* Make form inputs look cleaner in the split panel */
.auth-form-panel .form-group {
    margin-bottom: 20px;
}

.auth-form-panel .form-group input {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 14px;
}

.auth-form-panel .form-group input:focus {
    background-color: #ffffff;
    border-color: var(--safta-navy);
    box-shadow: 0 0 0 4px rgba(11, 44, 107, 0.1);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .home-content h1 { font-size: 2.5rem; }
    .home-cta { flex-direction: column; }
    .profile-details-grid { grid-template-columns: 1fr; }
    .detail-item.full-width { grid-column: span 1; }
    
    /* Stack the auth card on mobile */
    .auth-card {
        flex-direction: column;
    }
    
    .auth-side-panel {
        padding: 40px 30px;
        text-align: center;
    }

    .auth-side-content h2 {
        font-size: 2rem;
    }
    
    .auth-form-panel {
        padding: 40px 30px;
    }
}

@media (max-width: 600px) {
    .form-row { flex-direction: column; gap: 0; }
    .action-buttons { flex-direction: column; }
    .registration-card, .profile-card { padding: 30px 20px; }
}