/* Updated dark theme variables using provided color palette */
:root {
    /* Main backgrounds */
    --bg-primary: #052c5c;      /* Dark navy */
    --bg-secondary: #647484;    /* Muted slate gray */
    --bg-tertiary: #748494;     /* Slightly lighter gray-blue */

    /* Text colors */
    --text-primary: #efe8e5;    /* Light cream */
    --text-secondary: #b1b1b1;  /* Neutral grey */

    /* Accents */
    --accent: #fa6508;          /* Bright orange */
    --accent-hover: #0464a4;    /* Blue shade on hover/focus */

    /* Success/alert colors */
    --success-bg: #c5997c;
    --success-text: #ccdcec;
    --error-bg: #ccccd4;
    --error-text: #fa6508;

    /* Shared styles */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0 1rem;
}

.login-container {
    background-color: var(--bg-secondary);
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
}

h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.input-group {
    position: relative;
}

input[type="email"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-tertiary);
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="email"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(250, 101, 8, 0.2);
}

.forget-link {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: var(--error-text);
    text-decoration: none;
    font-weight: bold;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.forget-link:hover {
    background-color: rgba(250, 101, 8, 0.1);
}

.otp-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1rem;
    /* Allow inputs to wrap on smaller screens */
    flex-wrap: wrap;
}

.otp-input {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
    text-align: center;
    border-radius: var(--border-radius);
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(250, 101, 8, 0.1);
}

.error {
    color: var(--error-text);
    margin-top: 0.5rem;
    font-size: 0.9rem;
    text-align: center;
    background-color: var(--error-bg);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(250, 101, 8, 0.3);
    margin-bottom: 1rem;
}

.qr-code {
    display: block;
    margin: 1.5rem auto;
    max-width: 200px;
    height: auto;
}

@media (max-width: 480px) {
    .login-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    h2 {
        font-size: 1.2rem;
    }
    .otp-input {
        width: 2.5rem;
        height: 2.5rem;
    }
}