* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--portal-font);
}

body, html {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: #f8f9fa;
}

.split-screen {
    display: flex;
    width: 100vw;
    height: 100vh;
}

.brand-panel {
    flex: 0 0 30%;
    background: url('../images/login-lightmode-bg.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(24px, 4vw, 64px);
    position: relative;
    overflow: hidden;
    max-width: 100%;
    z-index: 2;
}

.brand-content {
    max-width: 400px;
    z-index: 2;
}

.logo-container img {
    width: 200px;
    max-width: 100%;
    height: auto;
    margin-bottom: 2rem;
}

.brand-panel h2 {
    font-size: 42px;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #ffffff;
    font-family: inherit;
}

.brand-panel h3 {
    font-size: 2rem;
    line-height: 1.25;
    font-weight: bold;
    margin-bottom: 1rem;
}

.brand-panel h3 span {
    font-size: 28px;
    color: #638ec6;
    font-weight: 600;
    display: block;
    white-space: normal;
}

.brand-panel p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #a0aec0;
}

.login-panel {
    flex: 1;
    background-color: #f8f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

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

.login-header {
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 16px;
    font-weight: bold;
    color: #63759D;
}

.input-group {
    margin-bottom: 1.25rem;
}

.input-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 0.5rem;
}

.input-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: var(--portal-control-radius);
    background-color: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-group input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-group input::placeholder {
    color: #9ca3af;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 2.5rem;
}

#toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #6b7280;
}

.form-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #374151;
}

.checkbox-container input {
    width: 1rem;
    height: 1rem;
    accent-color: #1d4ed8;
    cursor: pointer;
}

.forgot-link {
    color: #2563eb;
    text-decoration: none;
}

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

.btn-submit {
    width: 100%;
    padding: 0.75rem;
    background-color: #1d4ed8;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #1e40af;
}

.alert {
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #fee2e2;
    color: #b91c1c;
}

.alert-message {
    background-color: #d1fae5;
    color: #065f46;
}

.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 10;
    background: #f3f4f6; /* Soft, visible grey background for light mode */
    border: 1px solid #d1d5db; /* Clearer border */
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: #e5e7eb;
    transform: scale(1.05);
    border-color: #9ca3af;
}

.theme-toggle img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Dark mode styling for the toggle button */
.split-screen.dark-theme .theme-toggle {
    background: #1e293b; /* Distinct dark background */
    border: 1px solid #334155;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.split-screen.dark-theme .theme-toggle:hover {
    background: #334155;
    border-color: #475569;
}

.split-screen.dark-theme {
    background-color: #0b132b;
}

/* Switch Brand Panel Background Image */
.split-screen.dark-theme .brand-panel {
    background-image: url('../images/login-darkmode-bg.png') !important;
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

/* Right Form Panel Styles */
.split-screen.dark-theme .login-panel {
    background-color: #0b132b !important;
    color: #ffffff !important;
}

.split-screen.dark-theme .login-panel h2,
.split-screen.dark-theme .login-panel p,
.split-screen.dark-theme .login-panel label,
.split-screen.dark-theme .login-panel span,
.split-screen.dark-theme .login-panel a {
    color: #ffffff !important;
}

.split-screen.dark-theme .login-panel .input-group input {
    background-color: var(--report-soft) !important;
    border-color: var(--report-line) !important;
    color: var(--report-content) !important;
}

.split-screen.dark-theme .login-panel input::placeholder {
    color: #94a3b8 !important;
}

.input-group label { color: var(--report-content); font-size: 13px; font-weight: 500; }
.input-group input { min-height: var(--portal-control-height); padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--report-content); border-color: var(--report-line); background: var(--report-soft); }
.password-wrapper input { padding-right: 52px; }
.btn-submit { min-height: var(--portal-control-height); border-radius: var(--portal-control-radius); background: var(--portal-primary); font-size: 13px; font-weight: 500; }
.btn-submit:hover { background: var(--portal-primary-hover); }
#toggle-password { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; right: 6px; border-radius: 6px; }
.login-panel :is(button, input, a):focus-visible { outline: 3px solid var(--report-accent); outline-offset: 3px; }
.login-header p { font-size: 14px; font-weight: 400; line-height: 1.6; }
.alert { border-radius: 8px; padding: 14px 16px; font-size: 13px; line-height: 1.6; }
