/* --- Variables --- */
:root {
    --brand-red: #1c3e95;
    --brand-blue: ##1c3e95;
    --brand-dark: #3a3a3c;
    --brand-bg: #f4f6f8;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--brand-bg);
    margin: 0;
    padding: 0;
    /* Flexbox specifically for centering */
    display: flex;
    justify-content: center; /* Horizontal Center */
    align-items: center;     /* Vertical Center */
    min-height: 100vh;       /* Fallback */
    min-height: 100dvh;      /* Modern mobile fix */
    overflow: hidden;        /* Prevent scrolling on splash */
}

/* --- SPLASH SCREEN --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--brand-red);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s;
}

.splash-logo-container {
    background: white;
    width: 100px; /* Slightly smaller logo for mobile */
    height: 100px;
    
    /* MODIFIED: Changed from 50% (Circle) to 20px (Rounded Square) */
    border-radius: 20px; 
    
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

.splash-logo {
    width: 70%;
    height: auto;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.splash-hidden {
    opacity: 0;
    visibility: hidden;
}

/* --- MAIN LAYOUT --- */
.main-container {
    width: 90%;          /* Occupy 90% of screen width on mobile */
    max-width: 340px;    /* Cap width so it's not too large on desktop */
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.logo-header {
    text-align: center;
    margin-bottom: 20px;
}

.brand-logo {
    max-width: 140px; /* Reduced size for better proportions */
    height: auto;
}

/* --- CARD STYLES --- */
.card {
    background: var(--white);
    padding: 20px 25px; /* Reduced padding (Top/Bot 20px, L/R 25px) */
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 4px solid var(--brand-red);
}

/* --- TYPOGRAPHY & INPUTS --- */
h2 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 1.5rem;
}

.subtitle {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.input-group {
    text-align: left;
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--brand-dark);
}

.input-group input {
    width: 100%;
    padding: 10px 12px; /* Slightly sleeker input padding */
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px; /* Prevents auto-zoom on iPhone */
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--brand-blue);
    outline: none;
}

/* --- BUTTONS --- */
.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: var(--brand-red);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 5px;
}

.btn-primary:hover {
    background-color: #364f91;
}

.btn-outline {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: white;
    border: 1px solid #ddd;
    color: var(--brand-dark);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
    background-color: #234394;
}

/* --- UTILITIES --- */
.hidden { display: none; }

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

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

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--brand-blue);
    border-radius: 50%;
    width: 35px;
    height: 35px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
