:root {
    --primary-blue: #1F4FD8;
    --primary-blue-hover: #163cb3;
    --secondary-blue: #E9F0FF;
    --support-green: #4CAF50;
    --accent-yellow: #FBC02D;
    --bg-gray: #F7F9FC;
    --link-blue: #3b82f6;
    /* A lighter blue for the link, yet readable */
    --white: #FFFFFF;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --border-color: #E5E7EB;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, var(--white) 0%, var(--secondary-blue) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    padding: 40px 0;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 520px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 10px 32px 32px 32px;
    box-shadow: var(--shadow-medium);
    text-align: center;
}

.logo-container {
    margin-bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

#companyLogo {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 250px;
    object-fit: contain;
    display: block;
    margin: 0 auto 0 auto;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    font-weight: 500;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--bg-gray);
    color: var(--text-dark);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(31, 79, 216, 0.1);
}

.password-field {
    position: relative;
}

.toggle-visibility {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.toggle-visibility:hover {
    color: var(--text-dark);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    margin-top: 8px;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.forgot-password-link {
    margin-top: 20px;
}

.forgot-password-link a {
    color: var(--link-blue);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s ease;
}

.forgot-password-link a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.message {
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    min-height: 20px;
    text-align: center;
    font-weight: 600;
}

.message.error {
    color: #dc2626;
}

.message.success {
    color: #059669;
}

.login-actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--white);
    padding: 10px 32px 32px 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-medium);
    position: relative;
}

.modal h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
}

footer {
    width: 100%;
    max-width: 440px;
    margin-top: auto;
    padding-top: 40px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
}