/* ========================================
   Prima Finance Login - Trust Architecture
   Primary: #072890 | Accent: #e30613
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --login-primary: #072890;
    --login-primary-dark: #051c66;
    --login-primary-light: #0a3ab8;
    --login-accent: #e30613;
    --login-bg: #F7F8FC;
    --login-text-dark: #111827;
    --login-text-medium: #374151;
    --login-text-light: #6B7280;
    --login-text-muted: #9CA3AF;
    --login-border: #D1D5DB;
    --login-border-light: #E5E7EB;
}

/* ======== RESET — Override template-login.php layout ======== */
html, body {
    margin: 0;
    padding: 0;
    background: var(--login-bg);
}

/* Override page-auth.css constraints */
.authentication-wrapper.authentication-basic {
    align-items: stretch;
    justify-content: stretch;
    padding: 0 !important;
    margin: 0 !important;
}

.authentication-wrapper.authentication-basic.container-p-y:not([class^="pb-"]):not([class*=" pb-"]) {
    padding-bottom: 0 !important;
}
.authentication-wrapper.authentication-basic.container-p-y:not([class^="pt-"]):not([class*=" pt-"]) {
    padding-top: 0 !important;
}

.authentication-wrapper.authentication-basic .authentication-inner {
    max-width: none;
    width: 100%;
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.authentication-inner .page-content {
    display: flex !important;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
}

/* ======== BRAND PANEL — LEFT ======== */
.auth-brand-panel {
    width: 42%;
    min-height: 100vh;
    background: var(--login-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

/* Geometric pattern overlay */
.auth-brand-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background-image:
        linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(30deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(150deg, #fff 12%, transparent 12.5%, transparent 87%, #fff 87.5%, #fff),
        linear-gradient(60deg, rgba(255,255,255,0.5) 25%, transparent 25.5%, transparent 75%, rgba(255,255,255,0.5) 75%),
        linear-gradient(60deg, rgba(255,255,255,0.5) 25%, transparent 25.5%, transparent 75%, rgba(255,255,255,0.5) 75%);
    background-size: 60px 104px;
    background-position: 0 0, 0 0, 30px 52px, 30px 52px, 0 0, 30px 52px;
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    z-index: 2;
}

.auth-brand-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 24px;
    filter: brightness(0) invert(1);
}

.auth-brand-divider {
    width: 48px;
    height: 3px;
    background: var(--login-accent);
    margin-bottom: 24px;
    border-radius: 2px;
}

.auth-brand-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 12px 0;
}

.auth-brand-company {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
}

.auth-brand-accred {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
}

.auth-brand-copyright {
    position: absolute;
    bottom: 32px;
    left: 48px;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    margin: 0;
}

/* ======== FORM PANEL — RIGHT ======== */
.auth-form-panel {
    width: 58%;
    min-height: 100vh;
    background: var(--login-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.login_form {
    width: 100%;
    max-width: 380px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Remove old card styles */
.login_form::before {
    display: none;
}

/* Mobile logo — hidden on desktop */
.auth-mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 32px;
}

.auth-mobile-logo img {
    max-width: 160px;
    height: auto;
}

/* ======== FORM HEADER ======== */
.form-header {
    text-align: left;
    margin-bottom: 0;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--login-primary);
    margin-bottom: 28px;
}

.brand-icon {
    display: none;
}

.form-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--login-primary);
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.form-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--login-text-light);
    margin: 0;
    font-weight: 400;
}

/* ======== INPUT FIELDS ======== */
form .input_box {
    margin-bottom: 20px;
    position: relative;
}

form .input_box label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--login-text-medium);
    margin-bottom: 6px;
}

form .input_box input,
form .input_box select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--login-border);
    border-radius: 6px;
    background-color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    padding: 0 14px;
    color: var(--login-text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

form .input_box input::placeholder {
    color: var(--login-text-muted);
}

form .input_box input:hover,
form .input_box select:hover {
    border-color: #9CA3AF;
}

form .input_box input:focus,
form .input_box select:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 3px rgba(7, 40, 144, 0.08);
}

/* ======== SELECT DROPDOWN ======== */
form .input_box select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}

form .input_box select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23072890' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

form .input_box select::-ms-expand {
    display: none;
}

form .input_box select optgroup {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #333;
    background-color: #f3f4f6;
}

form .input_box select option {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    padding: 12px 16px;
    background-color: #fff;
    color: #333;
}

/* ======== PASSWORD FIELD ======== */
form .input_box .password_title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

form .input_box .password_title label {
    margin-bottom: 0;
}

form .input_box .password_title a {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--login-primary);
    text-decoration: none;
    transition: color 0.2s;
}

form .input_box .password_title a:hover {
    color: var(--login-primary-dark);
    text-decoration: underline;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px !important;
}

.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--login-text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    transition: all 0.2s;
}

.toggle-password:hover {
    color: var(--login-primary);
    background: rgba(7, 40, 144, 0.06);
}

.toggle-password svg.eye-icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* ======== SUBMIT BUTTON ======== */
form button[type="submit"],
form .authenticate {
    width: 100%;
    height: 48px;
    border-radius: 6px;
    border: none;
    background: var(--login-primary);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease;
}

form button[type="submit"]:hover,
form .authenticate:hover {
    background: var(--login-primary-light);
}

form button[type="submit"]:active,
form .authenticate:active {
    background: var(--login-primary-dark);
}

/* Remove old shine effect */
form button[type="submit"]::before,
form .authenticate::before {
    display: none;
}

form .authenticate .action.fa-sync {
    animation: spin 0.8s linear infinite;
}

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

/* ======== SIGN UP LINK (hidden) ======== */
.sign_up {
    display: none;
}

/* ======== RESPONSIVE ======== */
@media (max-width: 1024px) {
    .auth-brand-panel {
        width: 38%;
        padding: 36px;
    }

    .auth-brand-title {
        font-size: 24px;
    }

    .auth-brand-logo {
        max-width: 160px;
    }

    .auth-brand-copyright {
        left: 36px;
        bottom: 24px;
    }

    .auth-form-panel {
        width: 62%;
    }
}

@media (max-width: 767px) {
    .authentication-wrapper {
        background: var(--login-bg);
    }

    .authentication-inner {
        flex-direction: column;
        min-height: 100vh;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-form-panel {
        width: 100%;
        min-height: 100vh;
        padding: 40px 24px;
    }

    .auth-mobile-logo {
        display: block;
    }

    .login_form {
        max-width: 360px;
    }

    .form-header {
        text-align: center;
    }

    .form-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .auth-form-panel {
        padding: 32px 16px;
    }

    .login_form {
        max-width: 100%;
    }

    form .input_box input,
    form .input_box select {
        height: 46px;
    }

    form button[type="submit"],
    form .authenticate {
        height: 46px;
    }
}

/* ======== SCROLLBAR ======== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--login-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--login-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--login-text-muted);
}

/* ======== SELECTION ======== */
::selection {
    background: var(--login-primary);
    color: #fff;
}
