: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-image: url('../image/login-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    /* Dark slate overlay for text contrast */
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 2rem;
}

/* Left Side: Visual/Brand (hidden for full-page background layout) */
.login-visual {
    display: none !important;
}

@media (min-width: 992px) {
    .login-visual {
        display: flex;
        flex-direction: column;
        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.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.visual-decor-2 {
    position: absolute;
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.visual-content {
    position: relative;
    z-index: 2;
}

.visual-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.visual-content p {
    font-size: 1.15rem;
    font-weight: 300;
    opacity: 0.9;
    max-width: 85%;
    line-height: 1.6;
}

/* Right Side: Form (Styled as a centered glassmorphic card) */
/* Right Side: Form (Fully transparent background, floating directly on the page background) */
.login-form-wrapper {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    padding: 3.5rem 2.5rem;
    box-shadow: none;
    width: 100%;
    max-width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
}

@media (max-width: 576px) {
    .login-form-wrapper {
        padding: 2.5rem 1.5rem;
    }
}

.login-card {
    width: 100%;
    max-width: 420px;
}

.logo-mobile {
    display: block !important;
    margin: 0 auto 2rem auto !important;
    max-height: 110px;
    filter: brightness(0) invert(1);
    /* Invert logo to white for dark background */
}

.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;
}