/**
 * RiskAss Admin Login Page Styles
 * Microsoft 365 inspired design with Admin distinction
 */

/* Full page styles for login */
body.admin-login-page {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #f3f2f1;
}

.riskass-admin-login-page {
    min-height: 100vh;
    background: #f3f2f1;
    background-image: 
        linear-gradient(135deg, #faf9f8 0%, #edebe9 100%);
    background-attachment: fixed;
}

.riskass-admin-login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    position: relative;
}

/* Admin Badge - Integrated in login box */
.admin-badge {
    background: #FFF5ED;
    color: #D96B00;
    padding: 6px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 auto 20px;
    border: 1px solid #FFE0CC;
    width: fit-content;
}

.admin-badge i {
    font-size: 12px;
}

/* Login box with orange accent */
.login-box {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    padding: 48px;
    width: 100%;
    max-width: 440px;
    position: relative;
    overflow: hidden;
}

/* Orange accent line at top of login box - softer */
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #E89B4B 0%, #D96B00 100%);
}

/* Logo */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 40px;
    width: auto;
}

/* Titles */
.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #323130;
    margin: 0 0 8px;
}

.login-subtitle {
    font-size: 14px;
    color: #605e5c;
    margin: 0 0 32px;
}

/* Highlight "Admin" in subtitle */
.login-subtitle strong {
    color: #FF6B00;
}

/* Form */
.login-form {
    margin: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #323130;
    margin-bottom: 8px;
}

/* Input group */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #605e5c;
    pointer-events: none;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.input-icon i {
    font-size: 16px;
    display: block;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #605e5c;
    border-radius: 4px;
    font-size: 14px;
    color: #323130;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* Specific padding for inputs with icons */
.riskass-admin-login-container .input-group .form-input {
    padding-left: 42px;
}

.form-input::placeholder {
    color: #a19f9d;
    opacity: 1;
}

.form-input:hover {
    border-color: #323130;
}

/* Orange focus state for admin - softer */
.form-input:focus {
    border-color: #D96B00;
    outline: none;
    box-shadow: 0 0 0 1px #E89B4B;
}

/* Password toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #605e5c;
    cursor: pointer;
    padding: 8px;
    transition: color 0.1s ease;
}

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

/* Form options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #323130;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #D96B00;
}

.forgot-link {
    font-size: 14px;
    color: #D96B00;
    text-decoration: none;
    transition: color 0.1s ease;
    cursor: pointer;
}

.forgot-link:hover {
    color: #B85A00;
    text-decoration: underline;
}

/* Login button with softer orange theme */
.btn-login {
    width: 100%;
    padding: 12px 24px;
    background: linear-gradient(135deg, #E89B4B 0%, #D96B00 100%);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-login:hover {
    background: linear-gradient(135deg, #D96B00 0%, #C45F00 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 107, 0, 0.25);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: #a19f9d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading state */
.btn-login.loading {
    position: relative;
    color: transparent;
}

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

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

/* Message box */
.login-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 4px;
    font-size: 14px;
    animation: slideUp 0.3s ease-out;
}

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

.login-message.error {
    background-color: #FDE7E9;
    color: #A80000;
    border: 1px solid #F3D9DA;
}

.login-message.success {
    background-color: #DFF6DD;
    color: #0E7C0E;
    border: 1px solid #C3E6C3;
}

/* Footer */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #edebe9;
    text-align: center;
}

.login-footer p {
    margin: 0;
    font-size: 12px;
    color: #a19f9d;
}

/* Form links */
.form-links {
    margin-top: 24px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #D96B00;
    text-decoration: none;
    transition: color 0.1s ease;
}

.back-to-login:hover {
    color: #B85A00;
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .admin-badge {
        top: 20px;
        right: 20px;
        font-size: 10px;
        padding: 6px 12px;
    }
    
    .admin-badge i {
        font-size: 12px;
    }
    
    .login-box {
        padding: 32px 24px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* Template specific styles */
body.template-admin-login {
    background: #f3f2f1;
}

.template-admin-login .site-content {
    padding: 0;
}

/* Hide admin bar on login page */
body.template-admin-login #wpadminbar {
    display: none !important;
}

/* Full height container */
.template-admin-login .entry-content {
    margin: 0;
    max-width: none;
}