/* ==========================================================================
   UP Creative - Modern Client Portal Auth Stylesheet
   ========================================================================== */

:root {
    --auth-bg: #090d16;
    --auth-card-bg: rgba(17, 24, 39, 0.82);
    --auth-card-border: rgba(255, 255, 255, 0.08);
    --auth-accent: #ff5722;
    --auth-accent-light: #ff7043;
    --auth-accent-glow: rgba(255, 87, 34, 0.28);
    --auth-purple: #7137e8;
    --auth-purple-light: #a78bfa;
    --auth-text-primary: #ffffff;
    --auth-text-secondary: #94a3b8;
    --auth-text-muted: #64748b;
    --auth-input-bg: rgba(15, 23, 42, 0.7);
    --auth-input-border: rgba(255, 255, 255, 0.12);
    --auth-radius: 22px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.auth.client-auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--auth-bg);
    color: var(--auth-text-primary);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    position: relative;
    display: block;
}

/* --------------------------------------------------------------------------
   Ambient Glow Effects
   -------------------------------------------------------------------------- */
.auth-wrapper {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 16px;
    position: relative;
    z-index: 1;
}

.auth-backdrop-glow {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(80px);
}

.auth-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 87, 34, 0.16) 0%, rgba(255, 87, 34, 0) 70%);
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
}

.auth-glow-2 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(113, 55, 232, 0.15) 0%, rgba(113, 55, 232, 0) 70%);
    bottom: -120px;
    right: 5%;
}

/* --------------------------------------------------------------------------
   Auth Container & Card
   -------------------------------------------------------------------------- */
.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.auth-card {
    width: 100%;
    background: var(--auth-card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--auth-card-border);
    border-radius: var(--auth-radius);
    padding: 38px 34px 30px 34px;
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.7),
        0 0 50px rgba(255, 87, 34, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* --------------------------------------------------------------------------
   Header & Brand
   -------------------------------------------------------------------------- */
.auth-card-header {
    text-align: center;
    margin-bottom: 20px;
    border-radius: 16px;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.auth-brand:hover {
    transform: scale(1.03);
}

.auth-brand-logo {
    max-height: 48px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.4));
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(113, 55, 232, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(113, 55, 232, 0.35);
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

/* --------------------------------------------------------------------------
   Title & Subtitle
   -------------------------------------------------------------------------- */
.auth-title-box {
    text-align: center;
    margin-bottom: 22px;
}

.auth-title {
    font-size: 21px;
    font-weight: 700;
    color: var(--auth-text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.auth-subtitle {
    font-size: 13.5px;
    color: var(--auth-text-secondary);
    margin: 0;
    line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Form Elements
   -------------------------------------------------------------------------- */
.auth-card form {
    display: block;
    margin: 0;
}

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

.form-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.link-forgot {
    font-size: 12px;
    color: var(--auth-purple-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

.input-control {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--auth-text-muted);
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.auth-card .input-control input {
    width: 100% !important;
    height: 48px !important;
    background: var(--auth-input-bg) !important;
    border: 1px solid var(--auth-input-border) !important;
    border-radius: 12px !important;
    padding: 0 16px 0 44px !important;
    font-size: 14px !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    font-family: inherit !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.auth-card .input-control input:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.auth-card .input-control input:focus {
    outline: none !important;
    border-color: var(--auth-accent) !important;
    background: #0b1120 !important;
    box-shadow: 0 0 0 3px var(--auth-accent-glow) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
}

/* Neutralize Chrome / Safari / Edge Autofill Light Background */
.auth-card .input-control input:-webkit-autofill,
.auth-card .input-control input:-webkit-autofill:hover,
.auth-card .input-control input:-webkit-autofill:focus,
.auth-card .input-control input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #0b1120 inset !important;
    box-shadow: 0 0 0 1000px #0b1120 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    color: #ffffff !important;
    caret-color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.auth-card .input-control input:-webkit-autofill:focus {
    border-color: var(--auth-accent) !important;
    -webkit-box-shadow: 0 0 0 1000px #0b1120 inset, 0 0 0 3px var(--auth-accent-glow) !important;
    box-shadow: 0 0 0 1000px #0b1120 inset, 0 0 0 3px var(--auth-accent-glow) !important;
}

.auth-card .input-control input:focus ~ .input-icon,
.auth-card .input-control input:focus + .input-icon {
    color: var(--auth-accent);
}

.auth-card .input-control input::placeholder {
    color: var(--auth-text-muted) !important;
    -webkit-text-fill-color: var(--auth-text-muted) !important;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--auth-text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
    z-index: 2;
}

.btn-toggle-password:hover {
    color: var(--auth-text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

/* --------------------------------------------------------------------------
   Checkbox & Options
   -------------------------------------------------------------------------- */
.form-options {
    margin-bottom: 18px;
}

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--auth-text-secondary);
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.checkbox-container input {
    accent-color: var(--auth-accent);
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   Submit Button
   -------------------------------------------------------------------------- */
.btn-auth-submit {
    width: 100% !important;
    height: 48px !important;
    margin-top: 6px !important;
    background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-light) 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    cursor: pointer !important;
    box-shadow: 0 10px 24px rgba(255, 87, 34, 0.32) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(255, 87, 34, 0.42) !important;
    filter: brightness(1.05);
}

.btn-auth-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(255, 87, 34, 0.3) !important;
}

.btn-auth-submit.loading {
    opacity: 0.75 !important;
    cursor: wait !important;
    pointer-events: none !important;
}

/* --------------------------------------------------------------------------
   Footer & Links
   -------------------------------------------------------------------------- */
.auth-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    text-align: center;
}

.auth-footer-prompt {
    font-size: 13px;
    color: var(--auth-text-secondary);
    margin: 0 0 12px 0;
}

.auth-action-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
}

.auth-action-links.single {
    justify-content: center;
}

.btn-outline-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #f8fafc;
    text-decoration: none;
    font-weight: 500;
    font-size: 12.5px;
    transition: all 0.2s ease;
}

.btn-outline-action:hover {
    border-color: var(--auth-accent);
    color: var(--auth-accent);
    background: rgba(255, 87, 34, 0.08);
}

.link-back-site {
    color: var(--auth-text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.link-back-site:hover {
    color: var(--auth-accent-light);
}

.auth-copyright {
    margin: 22px 0 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--auth-text-muted);
}

.auth-copyright strong {
    color: var(--auth-text-secondary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Flash & AJAX Alerts
   -------------------------------------------------------------------------- */
.ajax_response {
    margin: 14px 0 18px 0;
    width: 100%;
}

.ajax_response:empty {
    margin: 0;
    display: none;
}

.message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
    box-sizing: border-box;
    animation: authAlertFadeIn 0.25s ease-out;
}

@keyframes authAlertFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message[class*="icon-"]::before {
    font-size: 16px;
    margin-right: 6px;
    display: inline-block;
}

.message.error {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
}

.message.success {
    background: rgba(34, 197, 94, 0.15) !important;
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

.message.warning {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
}

.message.info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px 24px 20px;
        border-radius: 18px;
    }

    .auth-title {
        font-size: 19px;
    }

    .auth-subtitle {
        font-size: 13px;
    }

    .auth-action-links {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}
