/* Common styles for all pages */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.logo img {
    height: 24px;
    width: auto; /* Keeps aspect ratio */
    
}

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

html, body {
    min-height: 100vh; /* Fallback */
    min-height: 100dvh; /* Dynamic viewport height for modern browsers */
    background: #f5f7fa;
    font-family: system-ui, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2vh;
    flex-direction: column;
}

.login-container {
    background: white;
    padding: 2em 2em;
    width: 100%;
    max-width: 440px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 0.6em;
    color: #333;
    font-size: 22px;
}

.form-group {
    margin-bottom: 1.2em;
    position: relative;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

input {
    width: 100%;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    height: 44px;
}

input::placeholder {
    color: #ddd;
    opacity: 1;
}

.error {
    color: red;
}

.success {
    color: green;
    text-align: center;
    margin-bottom: 1em;
    font-size: 0.95em;
}

button {
    width: 100%;
    padding: 1em 0.7em;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    margin-top: 20px;
}

button:hover {
    background: #45a049;
}

.register-link {
    text-align: center;
    margin-top: 1em;
    font-size: 0.9em;
}

.register-link a {
    color: #4CAF50;
    text-decoration: none;
}

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

.toggle-password {
    position: absolute;
    right: 10px;
    top: 40px;
    cursor: pointer;
    font-size: 0.9em;
}

/* Specific styles for logout page */
.login-container.logout {
    align-items: center;
}

.message {
    font-size: 1rem;
    color: #555;
    margin-bottom: 1.5em;
    text-align: center;
}

.register-link, .forgot-password {
    text-align: center;
    margin-top: 1em;
    font-size: 0.96em;
}

.register-link a, .forgot-password a {
    color: #4CAF50;
    text-decoration: none;
}

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

.forgot-password > a {
    color: cornflowerblue;
}

.spinner {
    display: none;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

.error-message {
    color: red;
}

.success-message {
    color: green;
}

.terms-privacy {
    font-size: 0.8em;
    color: #666;
    margin: 10px 0;
    text-align: center;
}

.terms-privacy a {
    color: #007bff;
    text-decoration: underline;
}