/* AEM Labs → Computey Admin >> Auth Gateway CSS
   ============================================= */

.portal {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

.portal main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.portal>footer {
    flex-shrink: 0;
    width: 100%;
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-color-2);
    text-align: center;
}

.portal>footer p {
    margin: 0;
    font-size: 13px;
    color: #ddd;
    letter-spacing: 0.3px;
}

.card {
    width: 100%;
    max-width: 450px;
    padding: 24px;
    background: var(--bg-color-2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.card header {
    margin-bottom: 20px;
}

.card header h1 {
    margin: 0;
    font-family: "Fraunces", Georgia, serif;
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.card form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.8px;
    color: #eee;
}

.field input {
    width: 100%;
    padding: 10px 12px;
    color: #fff;
    background: var(--bg-color-1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
    color: #ddd;
    opacity: 0.7;
}

.field input:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.field input:focus {
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.password-input-wrap {
    position: relative;
}

.password-input-wrap input {
    padding-right: 42px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #ddd;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease, background 0.15s ease;
}

.password-toggle:hover {
    color: white;
}

.card form button[type="submit"] {
    margin-top: 4px;
    width: 100%;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    color: #1a1a1a;
    background: var(--accent-color-1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.card form button[type="submit"]:hover {
    background: var(--accent-color-2);
}

.card form button[type="submit"]:active {
    transform: translateY(1px);
}

.card form button[type="submit"]:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.card form .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 6px 0;
    color: #ddd;
}

.card form .divider::before,
.card form .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.card form .oauth {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.card form .oauth button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    font-weight: 600;
    font-size: 15px;
    color: #eee;
    background: var(--bg-color-1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.card form .oauth button:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: var(--bg-color-1);
}

.card form .oauth button:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.card form .oauth button:active {
    transform: translateY(1px);
}

.card form .oauth svg {
    flex-shrink: 0;
    display: block;
}

.card footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 13px;
    color: #ddd;
}

.card footer a {
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: 600;
}

.card footer a:hover {
    text-decoration: underline;
}

#adminLoginForm.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

#adminLoginForm #submitBtn .btn-spinner {
    display: none;
}

#adminLoginForm.is-loading #submitBtn .btn-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#adminLoginForm.is-loading #submitBtn .btn-text {
    display: none;
}

#adminLoginForm #submitBtn.loading {
    opacity: 0.85;
}

#adminLoginForm .field input.error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

#adminLoginForm .field-error {
    color: #fca5a5;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}
