@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
}

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

body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
}

.login-wrapper {
    width: 100%;
    max-width: 900px;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    text-align: center;
}

/* Card Badge & Security Note */
.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-blue);
    background: #eff6ff;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid #bfdbfe;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.login-header .login-logo-img {
    display: block;
    height: 95px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 0.75rem auto;
    border-radius: 12px;
}

.security-note {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

/* Footer */
.login-footer {
    width: 100%;
    max-width: 650px;
    text-align: center;
    padding: 1.5rem 1rem 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent-blue);
}

.copyright {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}

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

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    background: var(--accent-blue-hover);
}

.error-message {
    color: var(--accent-red);
    font-size: 0.875rem;
    margin-top: 1rem;
    display: none;
}

/* Password label row with Forgot Password link */
.password-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.password-label-row label {
    margin-bottom: 0;
}

.forgot-password-link {
    font-size: 0.8rem;
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

/* Password input wrapper with toggle button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper .form-control {
    padding-right: 2.75rem;
    width: 100%;
}

.toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.35rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.toggle-password-btn:hover {
    color: var(--text-primary);
}

/* Sign up prompt for new users */
.login-signup-prompt {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.login-signup-link {
    color: var(--accent-blue);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
}

.login-signup-link:hover {
    color: var(--accent-blue-hover);
    text-decoration: underline;
}

.login-signup-icon {
    font-size: 0.75rem;
    margin-left: 0.15rem;
}

.security-note-top-margin {
    margin-top: 1rem;
}

/* Forgot Password Modal */
.forgot-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.forgot-modal-card {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 420px;
    padding: 1.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.forgot-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.forgot-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.forgot-modal-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
}

.forgot-modal-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.forgot-modal-form-group {
    margin-bottom: 1.25rem;
}

.forgot-modal-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.forgot-modal-input {
    width: 100%;
}

.forgot-modal-buttons {
    display: flex;
    gap: 0.75rem;
}

.btn-forgot-cancel {
    flex: 1;
    padding: 0.65rem;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-forgot-cancel:hover {
    background: #e2e8f0;
}

.btn-forgot-submit {
    flex: 1;
    padding: 0.65rem;
    border: none;
    background: var(--accent-blue);
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-forgot-submit:hover {
    background: var(--accent-blue-hover);
}
