/* Agentex admin auth pages. Pattern follows Tourex's staff login while staying
   scoped to this body class so it cannot affect the admin portal shell. */

.agentex-admin-login * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Raleway, sans-serif;
}

.agentex-admin-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 18%, rgba(46, 134, 193, 0.22), transparent 32rem),
        radial-gradient(circle at 85% 72%, rgba(0, 207, 180, 0.12), transparent 28rem),
        linear-gradient(135deg, #1b1f24, #262a30);
    color: #fff;
}

.agentex-admin-login .login-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.agentex-admin-login .login-screen {
    width: 380px;
    max-width: 100%;
    padding: 40px 30px;
    border: 1px solid rgba(158, 203, 250, 0.08);
    border-radius: 12px;
    background: #2f343b;
    box-shadow: 0 10px 30px rgba(158, 203, 250, 0.15);
}

.agentex-admin-login .logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.agentex-admin-login .agentex-wordmark {
    color: #fff;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.17em;
    opacity: 0;
    animation: agentex-fade-in 0.8s ease-out forwards;
}

.agentex-admin-login .resilionics-wordmark {
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.22em;
    color: transparent;
    background: linear-gradient(
        90deg,
        #9b6dff, #7c4dff, #6e45e2, #5d54e8, #4a6cf4, #3d8bfd,
        #00b4d8, #00cfb4, #48e5a0, #7cf49d, #00cfb4, #00b4d8,
        #4a6cf4, #7c4dff
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    opacity: 0;
    animation: agentex-slide-in 1.5s ease-out forwards, agentex-gradient-shift 8s ease-in-out infinite;
    animation-delay: 0.5s, 0s;
}

@keyframes agentex-gradient-shift {
    0% { background-position: 0 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@keyframes agentex-slide-in {
    0% { transform: translateY(-20px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

@keyframes agentex-fade-in {
    0% { opacity: 0; transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.agentex-admin-login .form-header {
    margin-bottom: 8px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
}

.agentex-admin-login .form-description {
    margin-bottom: 20px;
    color: #b5b5b5;
    text-align: center;
    font-size: 14px;
}

.agentex-admin-login .login {
    width: 100%;
}

.agentex-admin-login .login__field {
    position: relative;
    margin-bottom: 18px;
}

.agentex-admin-login .login__icon {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    color: #9ecbfa;
    font-family: bootstrap-icons !important;
    font-size: 22px;
    font-style: normal;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.agentex-admin-login .login__input {
    width: 100%;
    padding: 12px 42px;
    border: 2px solid #555;
    border-radius: 6px;
    background: #3a4047 !important;
    color: #fff !important;
    font-size: 16px;
    transition: all 0.3s ease;
}

.agentex-admin-login .login__input::placeholder {
    color: rgba(255, 255, 255, 0.58);
}

.agentex-admin-login .login__input:focus {
    border-color: #9ecbfa;
    background: #454b52 !important;
    box-shadow: 0 0 6px rgba(158, 203, 250, 0.4);
    outline: none;
}

.agentex-admin-login .login__input:-webkit-autofill,
.agentex-admin-login .login__input:-webkit-autofill:hover,
.agentex-admin-login .login__input:-webkit-autofill:focus,
.agentex-admin-login .login__input:-webkit-autofill:active {
    border: 2px solid #555 !important;
    -webkit-box-shadow: 0 0 0 30px #3a4047 inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    transition: background-color 5000s ease-in-out 0s;
}

.agentex-admin-login .login__select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #3a4047;
    color: #fff;
    cursor: pointer;
    padding-right: 42px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ecbfa' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.agentex-admin-login .login__select option {
    background-color: #3a4047;
    color: #fff;
}

.agentex-admin-login .login__select:focus {
    border-color: #9ecbfa;
    background-color: #454b52;
    box-shadow: 0 0 6px rgba(158, 203, 250, 0.4);
    outline: none;
}

.agentex-admin-login .login__select option[disabled] {
    color: rgba(255, 255, 255, 0.3);
}

.agentex-admin-login .password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 10;
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    color: #9ecbfa;
    cursor: pointer;
    opacity: 0.65;
    transform: translateY(-50%);
    transition: opacity 0.3s ease;
}

.agentex-admin-login .password-toggle:hover {
    opacity: 1;
}

.agentex-admin-login .password-toggle-icon {
    font-family: bootstrap-icons !important;
    font-size: 20px;
    font-style: normal;
    line-height: 1;
}

.agentex-admin-login .login__submit {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: 0;
    border-radius: 30px;
    background: #9ecbfa;
    color: #1b1f24;
    box-shadow: 0 4px 10px rgba(158, 203, 250, 0.4);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.agentex-admin-login .login__submit:hover {
    background: #7bb8f7;
    box-shadow: 0 6px 14px rgba(158, 203, 250, 0.6);
    transform: translateY(-2px);
}

.agentex-admin-login .login__submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

.agentex-admin-login .alert {
    margin-bottom: 15px;
    padding: 12px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    animation: agentex-alert-slide-in 0.3s ease-out;
}

@keyframes agentex-alert-slide-in {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.agentex-admin-login .alert-danger,
.agentex-admin-login .alert-error {
    border-color: rgba(220, 53, 69, 0.3);
    background-color: rgba(220, 53, 69, 0.15);
    color: #ff6b7a;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.agentex-admin-login .alert-warning {
    border-color: rgba(255, 193, 7, 0.3);
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc857;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.agentex-admin-login .alert-success {
    border-color: rgba(158, 203, 250, 0.3);
    background-color: rgba(158, 203, 250, 0.15);
    color: #9ecbfa;
    box-shadow: 0 2px 8px rgba(158, 203, 250, 0.2);
}

.agentex-admin-login .alert-info {
    border-color: rgba(13, 110, 253, 0.3);
    background-color: rgba(13, 110, 253, 0.15);
    color: #66b3ff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.2);
}

.agentex-admin-login .caps-lock-warning {
    display: none;
    margin-top: 4px;
    color: #9ecbfa;
    font-size: 0.875rem;
}

@media (max-width: 480px) {
    .agentex-admin-login .login-screen {
        width: 90%;
        padding: 24px 20px;
    }

    .agentex-admin-login .agentex-wordmark {
        font-size: 25px;
    }
}
