/* Elegant Portfolio Login Form - ASP.NET Modified */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    position: relative;
}

    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.08)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.06)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
        pointer-events: none;
        z-index: 0;
    }

h1 {
    font-family: 'Times New Roman', Times, serif;
    font-size: 26px;
    font-weight: 500;
    color: #333;
}

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

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 18px 40px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4, #45B7D1, #96CEB4);
    background-size: 200% 100%;
    animation: gradientSlide 3s ease infinite;
}

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

    50% {
        background-position: 100% 50%;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 10px;
}

.logo {
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    animation: logoFloat 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.login-header h1 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-header p {
    color: #718096;
    font-size: 15px;
    font-weight: 400;
}

/* Form Fields - ASP.NET TextBox Styling */
.form-field {
    position: relative;
    margin-bottom: 32px;
}

    .form-field input[type="text"],
    .form-field input[type="password"],
    .form-field input[type="email"],
    .form-field .form-input {
        width: 100%;
        background: transparent;
        border: none;
        border-bottom: 2px solid #e2e8f0;
        padding: 12px 0;
        color: #2d3748;
        font-size: 16px;
        font-weight: 400;
        outline: none;
        transition: all 0.3s ease;
        font-family: inherit;
    }

    .form-field input:focus {
        border-bottom-color: transparent;
    }

    .form-field label {
        position: absolute;
        left: 0;
        top: 12px;
        color: #a0aec0;
        font-size: 16px;
        font-weight: 400;
        pointer-events: none;
        transition: all 0.3s ease;
        transform-origin: left;
    }

    .form-field input:focus + label,
    .form-field input:not(:placeholder-shown) + label {
        top: -8px;
        font-size: 12px;
        font-weight: 600;
        color: #4a5568;
        transform: translateY(0);
    }

.field-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    transition: width 0.3s ease;
}

.form-field input:focus ~ .field-line {
    width: 100%;
}

/* Password Field */
.form-field:has(.password-reveal) input {
    padding-right: 48px;
}

.password-reveal {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #a0aec0;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .password-reveal:hover {
        color: #4a5568;
        background: rgba(0, 0, 0, 0.05);
    }

.eye-hide {
    display: none;
}

.password-reveal.reveal-active .eye-show {
    display: none;
}

.password-reveal.reveal-active .eye-hide {
    display: block;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 36px;
    flex-wrap: wrap;
    gap: 16px;
}

.forgot-password {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

    .forgot-password::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
        transition: width 0.3s ease;
    }

    .forgot-password:hover::after {
        width: 100%;
    }

    .forgot-password:hover {
        color: #2d3748;
    }

/* Sign In Button - ASP.NET Button Styling */
.signin-button,
input[type="submit"].signin-button {
    width: 100%;
    background: linear-gradient(135deg, #FF6B6B, #4ECDC4);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    margin-bottom: 32px;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

    .signin-button:hover::before {
        left: 100%;
    }

    .signin-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }

    .signin-button:active {
        transform: translateY(0);
    }

    .signin-button:disabled {
        background: #cbd5e0;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.button-text {
    transition: opacity 0.2s ease;
}

.button-loader {
    position: absolute;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.loader-circle {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.signin-button.loading .button-text {
    opacity: 0;
}

.signin-button.loading .button-loader {
    opacity: 1;
}

/* ASP.NET Validator Styling */
.error-message,
span[id*="rfv"],
span[id*="cv"],
span[id*="rv"] {
    color: #e53e3e;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    display: block;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
}

    .error-message.show,
    span[id*="rfv"][style*="visible"],
    span[id*="cv"][style*="visible"],
    span[id*="rv"][style*="visible"] {
        opacity: 1;
        transform: translateY(0);
    }

.form-field.error input {
    border-bottom-color: #e53e3e;
}

.form-field.error .field-line {
    background: #e53e3e;
    width: 100%;
}

.form-field.error label {
    color: #e53e3e;
}

/* Alert Error Panel */
.alert-error {
    background-color: #fff5f5;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success State */
.success-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

    .success-state.show {
        display: block;
        opacity: 1;
        transform: translateY(0);
    }

.success-visual {
    margin: 0 auto 20px;
    animation: successFloat 0.6s ease-out;
}

@keyframes successFloat {
    0% {
        transform: scale(0) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

.success-state h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.success-state p {
    color: #718096;
    font-size: 14px;
}

/* ASP.NET UpdatePanel Loading */
.ajax-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B, #4ECDC4);
    z-index: 9999;
    animation: loadingBar 1.5s ease-in-out infinite;
}

@keyframes loadingBar {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-card {
        padding: 36px 28px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    .form-actions {
        justify-content: flex-end;
    }

        .form-actions table {
            font-size: 13px;
        }
}

/* Print Styles */
@media print {
    body::before {
        display: none;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
