/* static/css/login.css - Blue/Navy Theme */

/* --- Variable Definitions --- */
:root {
    --primary-color: #0296ce;
    --primary-light: #e6f7ff; /* A lighter shade for backgrounds/hovers */
    --secondary-color: #003e67; /* The deep navy for text and accents */
    --background-color: #f0f8ff; /* A very light blue for the body */
    --white-color: #ffffff;
    --gray-color: #a0aec0;
    --light-gray-color: #edf2f7;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
}

/* --- Base & Reset Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--background-color);
    color: var(--secondary-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1140px; /* Standard container width */
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Header Styles (from your provided HTML) --- */
.page-header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0, 62, 103, 0.08);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    width: 120px;
    height: auto;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.header-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-family: var(--font-secondary);
    transition: color 0.3s ease;
}

.header-nav a:hover {
    color: var(--primary-color);
}

.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--secondary-color);
}

/* --- Main Login Content --- */
.login-main {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px; /* Space for fixed header */
    padding-bottom: 40px;
}

/* --- Form Container --- */
.form-container {
    background: var(--white-color);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 62, 103, 0.1);
    max-width: 450px;
    width: 100%;
    margin: 0 auto;
    border-top: 5px solid var(--primary-color);
}

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

.form-header h2 {
    font-family: var(--font-secondary);
    color: var(--secondary-color);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.form-header p {
    color: var(--gray-color);
    font-size: 16px;
}

/* --- Verification Page Specific --- */
.verify-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.verify-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 15px;
    min-height: 100vh;
}

.form-container h2 {
    font-family: var(--font-secondary);
    font-size: 24px;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#timer {
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

#timer .countdown {
    font-weight: 600;
    color: var(--primary-color);
}


/* --- Form Elements --- */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--secondary-color);
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--light-gray-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font-primary);
    background-color: var(--light-gray-color);
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: var(--gray-color);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    margin-bottom: 25px;
}

.forgot-password-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.forgot-password-link:hover {
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.btn-primary:hover {
    background-color: #027eb3; /* A slightly darker primary */
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(2, 150, 206, 0.2);
}

/* --- SSO & Dividers --- */
.sso-divider {
    text-align: center;
    margin: 25px 0;
    color: var(--gray-color);
    font-size: 14px;
    display: flex;
    align-items: center;
}

.sso-divider span {
    padding: 0 15px;
}

.sso-divider::before,
.sso-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--light-gray-color);
}

.btn-google {
    width: 100%;
    background-color: var(--white-color);
    color: var(--secondary-color);
    border: 1px solid var(--light-gray-color);
}

.btn-google:hover {
    background-color: var(--light-gray-color);
    border-color: var(--gray-color);
}

.btn-google .fab.fa-google {
    color: #DB4437; /* Official Google Red */
    font-size: 18px;
}

/* --- Register Link --- */
.register-link {
    text-align: center;
    margin-top: 30px;
    font-size: 15px;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

/* --- Flash Messages --- */
.flash-message {
    max-width: 450px;
    margin: 0 auto 20px auto;
    animation: fadeIn 0.5s ease;
}

.flash-message p {
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 15px;
    color: var(--white-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 5px solid;
}

.flash-message .success { background-color: var(--success-color); border-color: #27ae60; }
.flash-message .danger, .flash-message .error { background-color: var(--error-color); border-color: #c0392b; }
.flash-message .info { background-color: #3498db; border-color: #2980b9; }

.has-password-toggle { position: relative; }
.has-password-toggle input { padding-right: 44px; }

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--gray-color);
  font-size: 1rem;
}
.password-toggle:hover { color: var(--secondary-color); }

/* mobile menu open state */
.header-nav.open { display: block; }

/* --- Animations & Responsive Design --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 80px; /* Adjust for potentially wrapped header */
    }

    .mobile-nav-toggle {
        display: block; /* Show hamburger menu */
    }

    .header-nav {
        display: none; /* Hide nav links on mobile */
    }

    .form-container {
        padding: 30px 20px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .form-header p {
        font-size: 14px;
    }

    .form-actions {
        flex-direction: column-reverse;
        gap: 20px;
        align-items: stretch;
    }

    .btn-primary {
        width: 100%;
    }
}