/* Global Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #8b5cf6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover {
    background-color: #f1f5f9;
}

/* Header Styles */
header {
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo svg {
    width: 2rem;
    height: 2rem;
}

/* Main Content */
main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.login-container {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
    color: var(--gray);
    font-size: 0.9375rem;
}

.form-footer a {
    color: var(--primary);
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
}

/* OTP Verification */
.otp-container {
    margin: 2rem 0;
    display: none; /* Controlled by JS */
}

.otp-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.otp-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.otp-header p {
    color: var(--gray);
}

.otp-inputs {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.otp-input {
    width: 3rem;
    height: 3rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
}

.otp-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resend-link {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

.resend-link:hover {
    color: var(--primary-dark);
}

.countdown {
    color: var(--gray);
    font-size: 0.875rem;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--gray);
    font-size: 0.9375rem;
}

/* Message Box Styles */
.message-box {
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
}

.message-box.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-box.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive Styles */
@media (max-width: 640px) {
    .login-container {
        padding: 2rem 1.5rem;
        margin: 0 1rem;
    }

    .otp-inputs {
        gap: 0.25rem;
    }

    .otp-input {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1.125rem;
    }
}