/**
 * Auth Stylesheet - Login, Register, etc.
 * Circuit MYF System
 * Colors: Blue #7D8397, Yellow #D4B11E, White #FFFFFF
 */

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    background-color: #333;
}

/* Dark overlay for readability */
.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(125, 131, 151, 0.2);
    overflow: hidden;
}

.auth-header {
    background: #FFFFFF;
    padding: 40px 30px 30px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

/* MYF Logo Image */
.auth-logo-img {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-logo-img .logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(125, 131, 151, 0.3);
}

/* MYF Logo Styling (CSS fallback) */
.myf-logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
}

.logo-outer-ring {
    width: 120px;
    height: 120px;
    background: #7D8397;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(125, 131, 151, 0.4);
}

.motto-text {
    position: absolute;
    width: 100%;
    height: 100%;
    font-size: 0.45rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: 0.5px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8px;
    text-transform: uppercase;
}

.logo-yellow-circle {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #D4B11E 0%, #e6c94d 100%);
    border-radius: 50%;
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.logo-triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 52px solid #7D8397;
    position: relative;
    top: -5px;
}

.myf-text {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    font-weight: 900;
    color: #FFFFFF;
    letter-spacing: 2px;
}

/* Legacy support */
.auth-logo {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #D4B11E 0%, #e6c94d 100%);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(212, 177, 30, 0.35);
}

.auth-logo svg {
    width: 50px;
    height: 50px;
    fill: #FFFFFF;
}

.auth-logo-text {
    font-size: 2.8rem;
    font-weight: bold;
    color: #FFFFFF;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-title {
    color: #7D8397;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #999;
    font-size: 0.95rem;
}

.auth-body {
    padding: 35px 30px;
    background: #FFFFFF;
}

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

.auth-form .form-label {
    color: #7D8397;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    font-size: 0.9rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #FFFFFF;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #D4B11E;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(212, 177, 30, 0.15);
}

.auth-form .form-control::placeholder {
    color: #bbb;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper .form-control {
    padding-left: 50px;
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #D4B11E;
    font-size: 1.1rem;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #D4B11E;
}

.password-toggle:focus {
    outline: none;
}

.auth-form .btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #D4B11E 0%, #e6c94d 100%);
    border: none;
    border-radius: 12px;
    color: #FFFFFF;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(212, 177, 30, 0.3);
}

.auth-form .btn-login:hover {
    background: linear-gradient(135deg, #e6c94d 0%, #D4B11E 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 177, 30, 0.4);
}

.auth-form .btn-login:active {
    transform: translateY(-1px);
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #D4B11E;
}

.forgot-link {
    color: #7D8397;
    text-decoration: none;
    font-weight: 600;
}

.forgot-link:hover {
    color: #D4B11E;
}

.auth-footer {
    text-align: center;
    padding: 25px 30px;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    color: #888;
    font-size: 0.85rem;
    margin: 5px 0;
}

.auth-footer a {
    color: #D4B11E;
    font-weight: 600;
}

.auth-footer a:hover {
    color: #7D8397;
}

.auth-alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-alert.alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.auth-alert.alert-success {
    background-color: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.circuit-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #7D8397 0%, #9a9eb0 100%);
    color: #FFFFFF;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading state */
.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
}

.btn-login.loading::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: 10px;
    border: 2px solid #FFFFFF;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

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

/* Responsive */
@media (max-width: 480px) {
    .auth-wrapper::before {
        height: 250px;
    }

    .auth-header {
        padding: 30px 20px 25px;
    }

    .auth-body {
        padding: 30px 20px;
    }

    .myf-logo {
        width: 100px;
        height: 100px;
    }

    .logo-outer-ring {
        width: 100px;
        height: 100px;
    }

    .logo-yellow-circle {
        width: 75px;
        height: 75px;
        top: 12.5px;
        left: 12.5px;
    }

    .logo-triangle {
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        border-bottom: 43px solid #7D8397;
    }

    .myf-text {
        font-size: 0.75rem;
        top: 18px;
    }

    .motto-text {
        font-size: 0.38rem;
        padding-top: 6px;
    }

    .auth-logo {
        width: 75px;
        height: 75px;
    }

    .auth-logo-text {
        font-size: 2.2rem;
    }

    .auth-title {
        font-size: 1.4rem;
    }
}
