:root {
    --brand-color: #d93025;
    --brand-hover: #b71c1c;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --bg-color: #f8fafc;
    --border-color: #e2e8f0;
}

* {
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0b0f19;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

body::before {
    display: none;
}

.login-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
    padding: 0;
    margin: 0;
}

/* Left Side: Visual Image (desktop only, pure image without text overlay) */
.login-visual {
    display: none;
    position: relative;
    flex: 1 1 50%;
    min-height: 100vh;
    background-color: #f4f6f9;
    background-image: url('../image/Gemini_Generated_Image_18nc6m18nc6m18nc.jpg');
    background-size: contain;
    background-origin: content-box;
    background-position: center;
    background-repeat: no-repeat;
    padding: 3.5rem;
    overflow: hidden;
}

@media (min-width: 992px) {
    .login-visual {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Abstract circles for background decoration */
.visual-decor-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.visual-decor-2 {
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 2;
    max-width: 540px;
}

.visual-content h1 {
    font-size: 3.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -1px;
    line-height: 1.15;
    color: #ffffff;
}

.visual-content p {
    font-size: 1.15rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 90%;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
}

/* Right Side: Form Wrapper */
.login-form-wrapper {
    flex: 1 1 50%;
    min-height: 100vh;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2.5rem;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}

@media (min-width: 992px) {
    .login-form-wrapper {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.login-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
}

/* Brand logo above form (visible on both desktop and mobile) */
.logo-mobile {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto !important;
}

/* Ensure left visual has only the pure image, hiding any residual text */
.visual-content,
.visual-decor-1,
.visual-decor-2 {
    display: none !important;
}

/* Responsive: hide image, full-width fields on tablet & mobile */
@media (max-width: 991.98px) {
    .login-visual {
        display: none !important;
    }

    .login-form-wrapper {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100%;
        min-height: 100vh;
        padding: 2.5rem 1.5rem;
        background: #0f172a;
    }
}

/* Modern Dynamic CodeTech Brand Logo */
.login-brand-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.brand-badge-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--brand-color) 0%, var(--brand-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #ffffff;
    box-shadow: 0 10px 25px var(--theme-glow, rgba(0, 0, 0, 0.3));
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.brand-badge-icon:hover {
    transform: scale(1.08);
}

.brand-title-text {
    font-family: 'Barlow Condensed', 'Inter', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    margin-top: 0.6rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.brand-title-text span {
    color: #ffffff;
    background: var(--brand-color);
    padding: 2px 10px;
    border-radius: 8px;
    margin-left: 6px;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px var(--theme-glow, rgba(0, 0, 0, 0.2));
}

.form-header {
    margin-bottom: 2.5rem;
}

.form-header h2 {
    color: #ffffff;
    font-weight: 700;
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.form-header p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.05rem;
}

.form-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.2s ease;
    background-color: rgba(255, 255, 255, 0.1);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.15);
}

.input-group-text {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-left: none;
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.form-control:focus+.input-group-text {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: #ffffff;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 4px rgba(255, 255, 255, 0.15);
    clip-path: inset(-4px -4px -4px 0px);
}

.password-field {
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.password-field:focus {
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 0 4px rgba(255, 255, 255, 0.15);
    clip-path: inset(-4px 0px -4px -4px);
}

.forgot-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.btn-brand {
    background-color: var(--brand-color);
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(217, 48, 37, 0.2), 0 2px 4px -1px rgba(217, 48, 37, 0.1);
}

.btn-brand:hover {
    background-color: var(--brand-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(217, 48, 37, 0.3), 0 4px 6px -2px rgba(217, 48, 37, 0.15);
    color: white;
}

.btn-brand:active {
    transform: translateY(0);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.spinner-brand {
    width: 3rem;
    height: 3rem;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--brand-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.loading-subtext {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Helper overrides for dark background readability */
.form-check-label {
    color: rgba(255, 255, 255, 0.8);
}

.text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.text-brand {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.text-brand:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Modal overrides for contrast inside white bootstrap modals */
.modal-content .form-label {
    color: #1e293b;
}

.modal-content .form-control {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #0f172a;
}

.modal-content .form-control:focus {
    background-color: #ffffff;
    border-color: var(--brand-color);
    color: #0f172a;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.15);
}