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

body {
    font-family: 'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F5F9FF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow-x: hidden;
}

.bg-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    animation: floatShape 20s ease-in-out infinite;
}

.bg-shape:nth-child(1) {
    width: 600px;
    height: 600px;
    background: var(--primary);
    top: -300px;
    right: -200px;
    animation-delay: 0s;
}

.bg-shape:nth-child(2) {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -200px;
    left: -100px;
    animation-delay: -5s;
}

.bg-shape:nth-child(3) {
    width: 300px;
    height: 300px;
    background: var(--primary-light);
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

@keyframes floatShape {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    25% { transform: translate(30px, -30px) rotate(5deg) scale(1.05); }
    50% { transform: translate(-20px, 20px) rotate(-5deg) scale(0.95); }
    75% { transform: translate(15px, 15px) rotate(3deg) scale(1.02); }
}

.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.back-button:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateX(-5px);
}

.back-button svg {
    width: 18px;
    height: 18px;
}

.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow:
        0 0 0 1px rgba(0, 30, 97, 0.06),
        0 8px 24px rgba(0, 30, 97, 0.08),
        0 24px 56px rgba(0, 30, 97, 0.1);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #001E61, var(--primary), #004BEE, #93D388, var(--primary));
    background-size: 300% 100%;
    animation: gradientMove 5s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--background);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(0, 30, 97, 0.15);
}

.location-badge svg {
    width: 16px;
    height: 16px;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 90px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.welcome-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.welcome-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.info-box {
    background: var(--background);
    border: 1px solid rgba(0, 30, 97, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.info-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.info-content a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.info-content a:hover {
    text-decoration: underline;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-label svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 1.5px solid #D2D2D2;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: 'Inter', 'DM Sans', sans-serif;
    color: #222222;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-input:focus {
    outline: none;
    border-color: #001E61;
    box-shadow: 0 0 0 3px rgba(0, 30, 97, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: #A0A0A0;
}

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(241, 18, 18, 0.1);
}

.form-input.success {
    border-color: var(--success);
}

.error-message {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--error);
    margin-top: 0.5rem;
    padding-left: 0.25rem;
}

.error-message.show {
    display: flex;
}

.error-message svg {
    width: 14px;
    height: 14px;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 8px;
}

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

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.custom-checkbox {
    position: relative;
    width: 22px;
    height: 22px;
}

.custom-checkbox input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
    z-index: 1;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary);
}

.checkmark svg {
    width: 14px;
    height: 14px;
    color: white;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.remember-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    user-select: none;
}

.forgot-link {
    font-size: 0.9rem;
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
}

.forgot-link:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 30, 97, 0.28);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: 0 6px 18px rgba(0, 30, 97, 0.35);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(-1px);
}

.submit-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

.submit-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.submit-btn .spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.submit-btn.loading .spinner {
    display: block;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 30, 97, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 1rem;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(241, 18, 18, 0.1);
    color: var(--error);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-icon {
    width: 70px;
    height: 70px;
    background: var(--background);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(0, 30, 97, 0.1);
}

.modal-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    line-height: 1.6;
}

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

.modal-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
    box-shadow: 0 6px 18px rgba(0, 30, 97, 0.32);
}

.modal-success {
    display: none;
    text-align: center;
    padding: 1rem 0;
}

.modal-success.show {
    display: block;
}

.modal-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--success), #0FD89A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    animation: successPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.modal-success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-success h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-success p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1001;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    background: rgba(6, 171, 120, 0.1);
    color: var(--success);
}

.toast.error .toast-icon {
    background: rgba(241, 18, 18, 0.1);
    color: var(--error);
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive */
@media (max-width: 640px) {
    body { padding: 1rem; }
    .login-card { padding: 2rem 1.5rem; border-radius: 20px; }
    .logo { width: 70px; }
    .welcome-title { font-size: 1.6rem; }
    .form-options { flex-direction: column; align-items: flex-start; }
    .modal-content { padding: 2rem 1.5rem; }
    .toast { left: 1rem; right: 1rem; bottom: 1rem; }
}

*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
