/* login-modern.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body,
html {
    height: 100%;
    margin: 0;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    /* Prevent scrolling on the main page */
}

.split-screen {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* LEFT PANEL: Branding */
.branding-panel {
    width: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    overflow: hidden;
    /* Gradient Animation setup */
    background: linear-gradient(135deg, #0e4b3e, #1a8e79, #70C059, #235790);
    background-size: 400% 400%;
    animation: gradientPulse 15s ease infinite;
}

@keyframes gradientPulse {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.branding-content {
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.branding-logo {
    max-width: 250px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2));
}

.branding-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.branding-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    max-width: 80%;
    margin: 0 auto;
}

.powered-by {
    position: absolute;
    bottom: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
    z-index: 2;
}

.powered-by:hover {
    opacity: 1;
    color: #fff;
    text-decoration: underline;
}

/* Overlay pattern for texture (optional) */
.branding-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

/* RIGHT PANEL: Forms */
.form-panel {
    width: 50%;
    background-color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    position: relative;
    overflow-y: auto;
    /* Allow form to scroll if height is small */
}

.form-container {
    width: 100%;
    max-width: 450px;
}

.form-header {
    margin-bottom: 2rem;
    text-align: left;
}

.form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #666;
    font-size: 1rem;
}

.toggle-link {
    color: #1a8e79;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.toggle-link:hover {
    color: #0e4b3e;
    text-decoration: underline;
}

/* INPUT FIELDS */
.input-group {
    margin-bottom: 1.5rem;
    position: relative;
    opacity: 0;
    /* For animation */
    /* Animation definition */
    animation: fadeInUp 0.6s ease forwards;
}

/* Staggered delay for inputs (handled via nth-child in usage or general class) */
.input-group:nth-child(1) {
    animation-delay: 0.1s;
}

.input-group:nth-child(2) {
    animation-delay: 0.2s;
}

.input-group:nth-child(3) {
    animation-delay: 0.3s;
}

.input-group:nth-child(4) {
    animation-delay: 0.4s;
}

.input-group:nth-child(5) {
    animation-delay: 0.5s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control-custom {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #f8f9fa;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control-custom:focus {
    background-color: #fff;
    border-color: #1a8e79;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(26, 142, 121, 0.25);
}

.password-wrapper {
    position: relative;
}

.toggle-password-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    cursor: pointer;
    color: #999;
    z-index: 10;
}

.btn-primary-custom {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background-color: #1a8e79;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 2rem;
    box-shadow: 0 4px 6px rgba(26, 142, 121, 0.2);
}

.btn-primary-custom:hover {
    background-color: #0e4b3e;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(26, 142, 121, 0.3);
}

.btn-primary-custom:active {
    transform: translateY(1px);
}

/* Utilities */
.text-danger {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.hidden {
    display: none !important;
}

.forgot-password {
    text-align: right;
    margin-top: 0.5rem;
}

.forgot-password a {
    color: #666;
    font-size: 0.85rem;
    text-decoration: none;
}

.forgot-password a:hover {
    color: #1a8e79;
}

/* Responsive */
@media (max-width: 768px) {

    body,
    html {
        overflow: auto;
        /* Allow body scroll on mobile */
    }

    .split-screen {
        flex-direction: column;
        height: auto;
        /* Let content dictate height */
        min-height: 100vh;
    }

    .branding-panel {
        width: 100%;
        min-height: 200px;
        /* Reduced height */
        padding: 1.5rem 1rem;
    }

    .branding-logo {
        max-width: 100px;
        /* Smaller logo */
        margin-bottom: 0.5rem;
    }

    .branding-title {
        font-size: 1.75rem;
        /* Smaller title */
        margin-bottom: 0.5rem;
    }

    .branding-subtitle {
        font-size: 0.9rem;
    }

    .form-panel {
        width: 100%;
        padding: 1.5rem;
        /* Reduced padding */
        flex-grow: 1;
        min-height: auto;
    }

    .powered-by {
        display: none;
    }
}