
:root {
    --primary-color: #005C99;
    --primary-hover: #004578;
    --primary-light: #e6f2f9;
    --secondary-color: #64748b;
    --background-color: #e8eaed;
    --card-background: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --border-color: #e5e5e5;
    --border-hover: #d4d4d4;
    --error-color: #dc2626;
    --error-light: #fee2e2;
    --success-color: #059669;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

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

*:focus,
*:active {
    outline: none !important;
}

button:focus,
button:active,
input:focus,
input:active,
a:focus,
a:active {
    outline: none !important;
}

body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    padding: 2rem;
    position: relative;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--primary-color);
    z-index: 0;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    z-index: 0;
    opacity: 0.3;
}

.login-container {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 3rem 3rem;
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

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


.login-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.login-logo {
    width: 180px;
    height: auto;
    margin-bottom: 1.75rem;
    animation: fadeIn 0.8s ease-out 0.2s both;
    filter: drop-shadow(0 2px 8px rgba(0, 92, 153, 0.08));
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-title {
    font-size: 2.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.015em;
    animation: fadeIn 0.8s ease-out 0.3s both;
    line-height: 1.2;
}

.login-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    animation: fadeIn 0.8s ease-out 0.4s both;
}

.header-divider {
    width: 45px;
    height: 3px;
    background: var(--primary-color);
    margin: 1.5rem auto 0;
    border-radius: 3px;
    animation: fadeIn 0.8s ease-out 0.5s both;
}


.alert-message {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--error-light);
    border-left: 3px solid var(--error-color);
    border-radius: var(--radius-md);
    color: var(--error-color);
    font-size: 1.0625rem;
    margin-bottom: 1.5rem;
    animation: shake 0.5s ease-out;
    font-weight: 500;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.alert-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}


.login-form {
    animation: fadeIn 0.8s ease-out 0.5s both;
}

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

.form-label-modern {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.625rem;
    letter-spacing: -0.01em;
}

.input-wrapper {
    position: relative;
}

.input-wrapper ul.errors {
    position: relative;
    z-index: 1;
}

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 1rem;
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: all 0.25s ease;
    stroke-width: 2.5;
    margin-top: 0.125rem;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem 1.125rem 1rem 3rem;
    font-size: 1.125rem;
    color: var(--text-primary);
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    outline: none;
    transition: all 0.25s ease;
    font-family: inherit;
    font-weight: 500;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.input-wrapper input:hover {
    border-color: var(--border-hover);
    background: var(--card-background);
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    background: var(--card-background);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}


.form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.btn-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-modern:active::before {
    display: none;
}

.btn-primary-modern {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    letter-spacing: 0.01em;
}

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

.btn-primary-modern:active {
    background: var(--primary-hover);
}

.btn-secondary-modern {
    background: var(--card-background);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary-modern:hover {
    background: var(--background-color);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-icon {
    width: 18px;
    height: 18px;
}


.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    animation: fadeIn 0.8s ease-out 0.6s both;
}

.footer-text {
    font-size: 1rem;
    color: var(--text-tertiary);
    font-weight: 400;
    letter-spacing: 0.01em;
}


@media (max-width: 640px) {
    .login-wrapper {
        padding: 1.25rem;
    }
    
    .login-container {
        padding: 2.5rem 2rem;
        max-width: 100%;
    }
    
    .login-logo {
        width: 160px;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-subtitle {
        font-size: 1.125rem;
    }
    
    .form-label-modern {
        font-size: 1rem;
    }
    
    .input-wrapper input {
        font-size: 1rem;
        padding: 1rem 1.25rem 1rem 3.25rem;
    }
    
    .btn-modern {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}


@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.btn-modern:focus-visible,
.input-wrapper input:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}


@media print {
    .login-wrapper {
        background: white;
    }
    
    .login-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}


.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 92, 153, 0.3);
}

.form-group-modern {
    position: relative;
}

ul.errors {
    list-style: none;
    padding: 0.75rem 1rem;
    margin: 0.5rem 0 0 0;
    background: var(--error-light);
    border-left: 3px solid var(--error-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    color: var(--error-color);
}

ul.errors li {
    margin: 0;
    padding: 0;
}

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

::-moz-selection {
    background: var(--primary-color);
    color: white;
}
