﻿/* General Body and HTML styling */
body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
}

.min-h-screen {
    min-height: 100vh;
}

/* Form Styling */
form {
    height: 100vh;
    margin: 0;
    padding: 0;
}

.main-container {
    min-height: 100vh;
    background-color: #f8fafc;
    background-image: linear-gradient(to bottom right, #f8fafc, #ffffff, #f1f5f9);
    display: flex;
}

/* Left Section */
.left-section-container {
    display: none;
}
.left-section-container,
.right-section-container {
    flex: 0 0 50%; /* Explicitly sets the flex-basis to 50% (don't grow, don't shrink) */
    width: 50%;   /* Fallback and explicit width setting */
}

@media (min-width: 1024px) {
    .left-section-container {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        padding: 1.5rem;
        position: relative;
        overflow: hidden;
    }
}

.left-section-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1), rgba(168, 85, 247, 0.1));
    z-index: 0;
}

.left-section {
    max-width: 48rem;
    width: 100%;
    position: relative;
    z-index: 1;
}

.left-content {
    position: relative;
    z-index: 1;
}

.left-logo-card {
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

    .left-logo-card:hover {
        transform: scale(1.01);
    }

/* Right Section */
.right-section-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem; /* CHANGED: Reduced padding from 1.5rem */
}

.login-form-wrapper {
    width: 100%;
    max-width: 24rem;
    display: grid;
    gap: 1rem; /* CHANGED: Reduced gap from 1.5rem to reduce space between sections */
}

/* Header */
.login-header {
    text-align: right;
}

.logo-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0; /* CHANGED: Removed bottom margin */
}

.logo-text {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
}

.prompt-hr-logo {
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important; /* CHANGED: Reduced top margin */
    width: 160px !important; /* CHANGED: Slightly smaller logo */
}

/* Welcome Message */
.welcome-message {
    text-align: left;
    display: grid;
}

.welcome-heading {
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: -10px; /* ADDED: Remove default margin */
}

.welcome-subheading {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: visible !important;
}

.login-card {
    border-radius: 0.5rem;
    border-width: 0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
}

.company-logo-container {
    display: flex;
    flex-direction: column;
    padding: 0.75rem; /* CHANGED: Reduced padding */
    padding-bottom: 0.5rem; /* CHANGED: Reduced bottom padding */
}

.company-logo {
    width: 100%;
    height: auto;
}

.login-form-fields {
    padding: 0.75rem; /* CHANGED: Reduced padding */
    padding-top: 0;
}

.form-fields-wrapper {
    display: grid;
    gap: 0.75rem; /* CHANGED: Reduced gap from 1rem */
}

.form-field {
    display: grid;
    gap: 0.25rem;
}

/* Input and Form Controls */
.form-label {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: #475569;/* #334155;*/
}

.input-container {
    position: relative;
    margin-bottom: 0; /* CHANGED: Removed bottom margin to be handled by parent gap */
}
    .input-container.no-icon .input-icon {
        display: none;
    }
    .input-container.no-icon .form-control,
    .input-container.no-icon .asp-textbox {
        padding-left: 0.75rem; /* A standard padding value, adjust if needed */
    }

.form-control, .asp-textbox {
    flex: 1 1 0%;
    width: 100%;
    border-radius: 0.375rem;
    background-color: #ffffff;
    padding: 0.5rem 2.5rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    border: 2px solid #e2e8f0;
    height: 2.5rem;
    outline: none;
    box-sizing: border-box;
}

    .form-control:focus, .asp-textbox:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

.input-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    width: 1rem;
    height: 1rem;
    z-index: 10;
}

.toggle-password {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    z-index: 10;
}

    .toggle-password:hover {
        color: #64748b;
    }

/* Buttons and Links */
.btn-signin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    transform: scale(1);
    width: 100%;
    height: 2.5rem;
    background: #2563eb;
    /*background: linear-gradient(to right, #2563eb, #1d4ed8);*/
    color: white;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

    .btn-signin:hover {
        background: #2563eb;
        /*background: linear-gradient(to right, #1d4ed8, #1e40af);*/
        transform: scale(1.01);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .btn-signin:active {
        transform: scale(0.98);
    }

.forgot-password-container {
    text-align: right;
}

.forgot-link {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s;
}

    .forgot-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

.help-section {
    margin-top: 0.5rem; /* CHANGED: Reduced margin from 1rem */
    text-align: center;
}

.help-text {
    font-size: 0.75rem;
    line-height: 1rem;
    color: #475569;
}

.help-link {
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

    .help-link:hover {
        color: #1d4ed8;
        text-decoration: underline;
    }

/* Labels and Notices */
.error-label {
    color: #ef4444;
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 0.5rem; /* CHANGED: Reduced margin from 1rem */
    display: block;
}

.security-notice-container {
    text-align: center;
}

.security-notice {
    /*background-color: #eff6ff;
    border: 1px solid #bfdbfe;*/
    border-radius: 0.5rem;
    /*padding: 0.75rem;*/
}

.security-text {
    font-size: 0.75rem;
    line-height: 1rem;
    color: #2563eb; /*#1e40af;*/
}

.security-title {
    font-weight: 600;
}

/* Animations */
.animate-in {
    animation-fill-mode: both;
}

.slide-in-from-top {
    animation: slideInFromTop 0.5s ease-out;
}

.slide-in-from-bottom {
    animation: slideInFromBottom 0.5s ease-out;
    animation-delay: 0.3s;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

#forgotPasswordSection {
    display: none;
}

.responsive-img {
    max-width: 100%;
    height: auto;
}

/*
 * =========================================================================================
 * THIRD-PARTY LIBRARY OVERRIDES
 * =========================================================================================
 */

/* * Flatpickr Calendar Styling
 * This ensures the calendar matches the new page design and font.
 */
.flatpickr-calendar {
    /* --- FONT & COLOR --- */
    font-family: inherit !important; /* This is the key change to match the page font */
    background: #ffffff;
    color: #334155;
    /* --- BORDER & SHADOW --- */
    border-radius: 0.5rem; /* Matches .login-card */
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Matches .login-card */
}

/* Style for the individual days */
.flatpickr-day {
    color: #334155;
}

    .flatpickr-day:hover {
        background: #eef2ff; /* A light indigo for hover */
    }

    /* Style for the selected day */
    .flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
        background: #2563eb; /* Matches .btn-signin */
        border-color: #2563eb;
    }

    /* Style for the "today" date */
    .flatpickr-day.today {
        border-color: #2563eb;
    }

/* Style for the month/year navigation arrows */
.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
    fill: #2563eb; /* Matches .btn-signin color */
}
