/* Authentication Page Styles - EMCopilot Auth Server */
/* Based on Unity Hybrid Forecast System Design */

/* Local fonts - see fonts.css */

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

body {
    font-family: 'Nunito', sans-serif !important;
    background-color: #f5f6f8 !important;
    color: #4c4c5c;
    font-size: 0.875rem;
    line-height: 1.5;
}

.auth-box {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-brand img {
    height: 32px;
    margin-bottom: 1rem;
}

.auth-brand h1 {
    color: #313a46;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-brand p {
    color: #8a969c;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 1rem auto 0;
    max-width: 75%;
}

/* Decorative SVG Background */
.card .position-absolute svg {
    opacity: 0.075 !important;
    width: 100%;
    height: auto;
}

/* Form Styling */
form {
    width: 100%;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #343a40;
    font-size: 0.875rem;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group input {
    width: 100%;
}

/* Remember Me & Forgot Password */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.form-check {
    display: flex;
    align-items: center;
    padding-left: 0;
}

.form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    color: #8a969c;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Links */
a {
    color: #6658dd;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #5447bb;
}

.text-decoration-underline {
    text-decoration: underline !important;
}

.link-offset-3 {
    text-underline-offset: 0.1875rem;
}

.text-muted {
    color: #8a969c !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

/* Divider */
.position-relative {
    position: relative !important;
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.position-relative hr {
    margin: 0;
    border: 0;
    border-top: 1px solid #e7e9eb;
}

.position-relative .translate-middle {
    transform: translate(-50%, -50%);
}

.bg-white {
    background-color: white !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* OAuth Button */
.btn-outline-secondary {
    color: #4c4c5c;
    border-color: #e7e9eb;
    background-color: white;
}

.btn-outline-secondary:hover {
    background-color: #f5f6f8;
    border-color: #d0d3d9;
}

.btn svg {
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* Footer Copyright */
.text-center {
    text-align: center !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 767.98px) {
    .auth-box {
        padding: 1rem;
    }
    
    .auth-brand p {
        max-width: 100%;
    }
    
    .card {
        padding: 2rem 1.5rem !important;
    }
}

@media (max-width: 575.98px) {
    .card {
        padding: 1.5rem 1rem !important;
    }
    
    .auth-brand img {
        height: 28px;
    }
    
    .auth-brand h1 {
        font-size: 1.25rem;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
}

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

/* Error/Success Messages */
.alert {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Password Strength Indicator */
.password-bar {
    height: 3px;
    background-color: #e7e9eb;
    border-radius: 2px;
    overflow: hidden;
}

.password-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background-color: #f1556c;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-bar.weak::before {
    width: 33%;
    background-color: #f1556c;
}

.password-bar.medium::before {
    width: 66%;
    background-color: #f7b84b;
}

.password-bar.strong::before {
    width: 100%;
    background-color: #1abc9c;
}

.fs-xs {
    font-size: 0.75rem !important;
}
