:root {
    --bg-white: #f8f9fa;       /* Main background */
    --card-white: #ffffff;     /* Card background */
    --border-light: #e0e0e0;   /* Input and card borders */
    --red: #e31e24;            /* Primary brand red */
    --bright-red: #ff1744;     /* Hover states */
    --text-main: #2d2d2d;      /* Primary text */
    --text-muted: #757575;     /* Labels and secondary text */
    --success-green: #27ae60;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-white);
    min-height: 100vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    overflow-y: auto; 
    padding: 20px;
    position: relative;
}

/* Updated decorative glow for light mode */
body::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--red);
    filter: blur(180px);
    opacity: 0.05; /* Kept very subtle */
    top: -100px;
    right: -100px;
    z-index: -1;
}

.login-card {
    background: var(--card-white);
    width: 100%;
    max-width: 450px;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    /* Softer shadow for light theme */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
    position: relative;
    overflow: hidden;
}

/* Top red accent bar */
.login-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--red);
}

.header {
    text-align: center;
    margin-bottom: 25px;
}

.logo-container {
    margin-bottom: 12px;
}

.main-logo {
    max-width: 100px;
    height: auto;
}

.header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.header p {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 5px;
}

/* Grid for First Name / Last Name */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-group input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 30, 36, 0.1); /* Soft red focus ring */
}

/* Password Visibility Wrapper */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--red);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background: #c1171d;
    box-shadow: 0 4px 12px rgba(227, 30, 36, 0.2);
}

/* Feedback Boxes */
.error-box, .success-box {
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.error-box {
    background: #fdf2f2;
    border: 1px solid #f9d6d6;
    color: var(--red);
}

.success-box {
    background: #f0f9f4;
    border: 1px solid #d1eade;
    color: var(--success-green);
    flex-direction: column;
}

.footer-text {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-text a {
    color: var(--red);
    text-decoration: none;
    font-weight: 700;
}

.footer-text a:hover {
    text-decoration: underline;
}

.version {
    margin-top: 15px;
    opacity: 0.6;
    font-size: 10px;
}

/* Responsive Handling */
@media (max-width: 480px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .login-card {
        padding: 20px;
    }
}