/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap');

/* Variables */
:root {
    --primary-color: #696cff;
    --primary-color-rgb: 105, 108, 255;
    --primary-dark: #5f61e8;
    --secondary-color: #8592a3;
    --white: #fff;
    --light-gray: #f4f7fa;
    --medium-gray: #e9edf4;
    --dark-gray: #6c757d;
    --text-color: #344767;
    --heading-color: #344767;
    --body-bg: var(--white);
    --input-bg: var(--white);
    --input-border: var(--medium-gray);
    --input-focus-border: var(--primary-color);
    --input-focus-shadow: rgba(var(--primary-color-rgb), 0.15);
    --link-color: var(--primary-color);
    --link-hover-color: var(--primary-dark);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --gradient-start: #7678f7;
    --gradient-end: #5858f3;
    --font-family-base: 'Public Sans', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-size-small: 0.875rem;
    --font-size-base: 1rem;
    --font-size-medium: 1.125rem;
    --font-size-large: 1.5rem;
    --font-size-xlarge: 2rem;
    --line-height-tight: 1.2;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;
    --gradient-dark-start: #1a2980; /* Deep dark blue */
    --gradient-dark-end: #181819; /* Teal accent %;   #26d0ce */
    --gradient-dark-angle: 135deg; /* Teal accent %;   #26d0ce */
}

/* Global Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: var(--font-family-base);
    background-color: var(--body-bg);
    line-height: var(--line-height-normal);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    font-size: 16px; /* Base font size */
}

@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

    a:hover {
        color: var(--link-hover-color);
        text-decoration: underline;
    }

h4 {
    font-size: var(--font-size-large);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    letter-spacing: -0.02em;
    color: var(--heading-color);
    margin-bottom: 0.75rem !important;
}

p {
    margin-bottom: 1rem;
}

/* Left Side - Company Info */
.company__info {
    background: linear-gradient(var(--gradient-dark-angle), var(--gradient-dark-start), var(--gradient-dark-end));
    background-size: 400% 400%;
    animation: GradientAnimation 15s ease infinite;
    position: relative;
    overflow: hidden;
    color: var(--white);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

    .company__info .text-center {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        max-width: 300px;
        margin: 0 auto;
    }

@keyframes GradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes FadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-logo {
    max-width: 150px;
    height: auto;
    object-fit: contain;
    margin-bottom: 1rem;
}

.company-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.75rem;
    animation: FadeInUp 1s ease-out;
}

.company-tagline {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 280px;
    text-align: center;
    animation: FadeInUp 1s ease-out;
}

.z-index-1 {
    position: relative;
    z-index: 1;
}

/* Abstract Background Shapes */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.08);
    z-index: 0;
}

.shape1 {
    width: 200px;
    height: 200px;
    top: -50px;
    left: -50px;
    opacity: 0.8;
}

.shape2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -80px;
    opacity: 0.6;
}

.shape3 {
    width: 120px;
    height: 120px;
    bottom: 40%;
    left: 20%;
    opacity: 0.7;
}

/* Right Side - Login Form */
.login_form {
    background-color: var(--body-bg);
    min-height: 100%;
    padding: 3rem 1rem;
}

.form-container {
    width: 100%;
    background-color: var(--white);
    padding: clamp(1.5rem, 5vw, 2.5rem);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

/* Enhanced Input Group Styling with Glow Effects */
.input-group-custom {
    position: relative;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
}

/* Input Group Styling (Reference Style) */
.input-group-text-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: var(--secondary-color);
    z-index: 3;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-control-custom {
    padding: 0.85rem 0.85rem 0.85rem 45px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    font-family: var(--font-family-base);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--input-bg);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: calc(1.6em + 1.7rem + 2px);
    width: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    letter-spacing: 0.5px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

    .form-control-custom:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.15), /* Soft color glow */
        0 4px 10px rgba(var(--primary-color-rgb), 0.1); /* Subtle elevation */
        outline: none;
        transform: translateY(-2px); /* Slight lift effect */
    }

.input-group-text-custom {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.form-control-custom:focus ~ .input-group-text-custom {
    color: var(--primary-color);
    transform: scale(1.1); /* Subtle icon emphasis */
}

/* Floating Label Effect */
.form-label-custom {
    position: absolute;
    top: 50%;
    left: 45px;
    transform: translateY(-50%);
    color: var(--secondary-color);
    background-color: var(--input-bg);
    padding: 0 5px;
    margin: 0;
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-regular);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
    z-index: 2;
    opacity: 1;
    will-change: transform, color;
}

.form-control-custom:focus + .form-label-custom {
    color: var(--primary-color);
    transform: translateY(-120%) scale(0.85);
    background-color: transparent;
    padding: 0;
}

.form-control-custom:not(:placeholder-shown) + .form-label-custom {
    top: 0;
    left: 40px;
    font-size: 0.75rem;
    color: var(--primary-color);
    opacity: 1;
}

/* Placeholder styling */
.form-control-custom::placeholder {
    transition: all 0.3s ease;
    opacity: 0.5;
    color: transparent;
}

.form-control-custom:focus::placeholder {
    opacity: 0.3;
    transform: translateX(5px);
}

/* Password Toggle Specific */
.form-password-toggle .form-control-custom {
    padding-right: 45px;
}

.form-password-toggle .password-toggle-icon {
    left: auto;
    right: 15px;
    cursor: pointer;
    z-index: 3;
    transition: color 0.2s ease;
}

    .form-password-toggle .password-toggle-icon:hover {
        color: var(--primary-color);
    }

/* Checkbox */
.form-check {
    padding-left: 0;
    display: flex;
    align-items: center;
}

.form-check-input {
    margin-left: 0;
    margin-right: 0.6em;
    border-radius: 4px;
    border-color: var(--input-border);
    width: 1.1em;
    height: 1.1em;
    margin-top: 0;
    flex-shrink: 0;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-check-input:checked {
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

    .form-check-input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem var(--input-focus-shadow);
    }

.form-check-label {
    font-size: 0.9rem;
    color: var(--dark-gray);
    cursor: pointer;
    padding-top: 0;
}

/* Forgot Password Link */
.forgot-password-link {
    font-size: 0.9rem;
    color: var(--link-color);
}

    .forgot-password-link:hover {
        color: var(--link-hover-color);
    }

/* Button Styles */
.btn-primary {
    background: linear-gradient(var(--gradient-dark-angle), var(--gradient-dark-start), var(--gradient-dark-end));
    background-size: 400% 400%;
    animation: GradientAnimation 15s ease infinite;
    border: none;
    color: var(--white);
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.25s ease;
    text-transform: none;
    background-position: 0% 50%;
}

    .btn-primary:hover {
        background-position: 100% 50%;
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    }

    .btn-primary:active, .btn-primary:focus {
        background-position: 100% 50%;
        transform: translateY(0);
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }

/* Create Account Text */
.create-account-text {
    font-size: 0.9rem;
    color: var(--dark-gray);
    background: none;
    text-shadow: none;
    padding: 0;
}

.create-account-link {
    font-weight: 600;
    color: var(--link-color);
}

    .create-account-link:hover {
        color: var(--link-hover-color);
    }

/* Text Muted */
.text-muted {
    color: var(--dark-gray) !important;
    font-size: 0.95rem;
}

/* Specific modifications to remove background effects from text elements */
.form-container h4 {
    background: white;
    color: var(--text-color);
    text-shadow: none;
    padding: 0;
    margin-bottom: 0.5rem;
    text-align: center;
}

.form-container p.text-muted {
    background: none;
    text-shadow: none;
    padding: 0;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Optional: Ensuring text is readable against any background */
.form-container h4,
.form-container p.text-muted,
.create-account-text {
    color: var(--text-color);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .main-content {
        height: auto;
        min-height: 100vh;
    }

    .company__info {
        display: none !important;
    }

    .login_form {
        padding: 2rem 1rem;
        display: flex;
        align-items: flex-start;
        padding-top: 4rem;
    }

    .form-container {
        padding: 1.5rem;
        box-shadow: none;
    }

    h4 {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .form-container {
        padding: 1rem 0.5rem;
    }

    h4 {
        font-size: 1.35rem;
    }

    .form-control-custom {
        padding: 0.75rem 0.75rem 0.75rem 40px;
        font-size: 0.9rem;
        height: calc(1.6em + 1.5rem + 2px);
    }

    .form-label-custom {
        left: 40px;
        font-size: 0.9rem;
    }

    .input-group-text-custom {
        left: 12px;
        font-size: 0.85rem;
    }

    .form-control-custom:focus + .form-label-custom,
    .form-control-custom:not(:placeholder-shown) + .form-label-custom {
        left: 35px;
        font-size: 0.7rem;
    }

    .form-password-toggle .form-control-custom {
        padding-right: 40px;
    }

    .form-password-toggle .password-toggle-icon {
        right: 12px;
    }

    .form-check-label, .forgot-password-link, .create-account-text {
        font-size: 0.85rem;
    }

    .btn-primary {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .company-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .company-tagline {
        font-size: clamp(0.9rem, 4vw, 1.1rem);
    }

    .btn-primary {
        font-size: clamp(0.9rem, 4vw, 1rem);
    }
}

/* Update the login form logo section */
.form-container .text-center {
    background: linear-gradient(var(--gradient-dark-angle), var(--gradient-dark-start), var(--gradient-dark-end));
    background-size: 400% 400%;
    animation: GradientAnimation 15s ease infinite;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.login-form-logo {
    max-width: 100px;
    height: auto;
    object-fit: contain;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
    margin-bottom: 0;
    position: relative;
    top: 0;
    filter: brightness(1.1) contrast(1.1);
}

/* Adjust text color for better contrast on gradient background */
.form-container .text-center h4 {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 576px) {
    .login-form-logo {
        max-width: 80px;
    }
}

/* Smooth Responsive Transitions */
* {
    transition: all 0.3s ease-in-out;
}

/* Enhanced Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* Improved Focus States */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

/* Dynamic Scaling for Different Devices */
.main-content {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* Responsive Image Handling */
.company-logo {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Improved Mobile Responsiveness */
@media (max-width: 768px) {
    .login_form {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
    }

    .form-container {
        width: 100%;
        max-width: 400px;
    }
}

/* Responsive Adjustments for Form Container */
@media (min-width: 768px) {
    .login_form .container {
        max-width: 90%;
    }

    .login_form .row .col-sm-10,
    .login_form .row .col-md-10,
    .login_form .row .col-lg-8,
    .login_form .row .col-xl-7 {
        max-width: 500px;
        width: 100%;
    }

    .form-container {
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
}

/* For very large screens, prevent form from getting too wide */
@media (min-width: 1200px) {
    .login_form .row .col-sm-10,
    .login_form .row .col-md-10,
    .login_form .row .col-lg-8,
    .login_form .row .col-xl-7 {
        max-width: 550px;
    }

    .form-container {
        max-width: 500px;
    }
}

/* Cleanup - Remove potentially conflicting old styles */
.authentication-wrapper, .authentication-inner, .graphic-section, .authentication-bg, .w-px-400, .app-brand, .dashboard-preview-img, .graphic-heading, .graphic-text, .input-group-merge, .form-label, .input-group.is-focused {
    all: unset;
}
/* Reapply necessary resets if `all: unset` is too broad */
body {
    font-family: var(--font-family-base);
    color: var(--text-color);
    background-color: var(--body-bg);
    height: 100%;
    margin: 0;
    line-height: var(--line-height-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
