/* ==========================
   ROOT VARIABLES
========================== */
:root {
    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Colors */
	--primary: #2f7dd3;
	--primary-600: #2a6fbc;
	--secondary: #1f5ea3;
	--accent: #7f56d9;
	--bg-light: #eef3f8;
	--bg-gradient-1: #f7fbff;
	--bg-gradient-2: #eef4ff;
	--card-bg: #ffffff;
	--card-bg-translucent: rgba(255,255,255,0.85);
	--text-dark: #1f2a37;
	--text-light: #475569;
	--muted: #64748b;
	--input-border: #e3e8ef;
	--input-bg: #fafbff;
	--ring: rgba(47, 125, 211, 0.35);
	--error: #e74c3c;

    /* Spacing & Borders */
    --radius-lg: 15px;
    --radius-sm: 8px;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 35px;

	/* Shadows */
	--shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
	--shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
	--shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
}

/* ==========================
   RESET & BASE STYLES
========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
	background-color: var(--bg-light);
	background-image:
		radial-gradient(60rem 60rem at 20% -10%, var(--bg-gradient-2) 0%, transparent 60%),
		radial-gradient(50rem 50rem at 120% 10%, var(--bg-gradient-1) 0%, transparent 60%),
		linear-gradient(180deg, #f9fbff 0%, #f3f6fb 100%);
}

/* ==========================
   LOGIN PAGE LAYOUT
========================== */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
	padding: var(--spacing-md);
}

/* Generic panel wrapper to ensure consistent spacing in both sides */
.panel {
	position: relative;
	min-height: 400px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    height: 600px;
    border-radius: var(--radius-lg);
    overflow: hidden;
	box-shadow: var(--shadow-lg);
	background-color: var(--card-bg-translucent);
	backdrop-filter: saturate(140%) blur(10px);
	border: 1px solid rgba(15, 23, 42, 0.06);
	animation: fadeUp 600ms cubic-bezier(.2,.7,.2,1) both;
}

/* ==========================
   LEFT PANEL (GRAPHIC)
========================== */
.graphic-panel {
    flex: 3;
	background-color: rgba(240, 245, 252, 0.6);
    color: var(--text-dark);
    position: relative;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.graphic-content {
    max-width: 80%;
}

.graphic-content h1 {
    font-family: var(--font-heading);
	font-weight: 800;
	font-size: 2.6em;
	letter-spacing: -0.02em;
	color: var(--text-dark);
	margin-bottom: var(--spacing-md);
}

.graphic-content p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1em;
	color: var(--muted);
    line-height: 1.5;
}

/* Abstract Graphic Styling */
.graphic-panel::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 120%;
    height: 80%;
	background: linear-gradient(75deg, rgba(47,125,211,0) 0%, rgba(47,125,211,0.35) 30%, rgba(127,86,217,0.28) 60%, rgba(31,94,163,0) 100%);
    clip-path: polygon(0 80%, 100% 50%, 100% 100%, 0 100%);
    filter: blur(3px);
	opacity: 0.6;
    transform: skewY(5deg);
    z-index: 0;
}

/* ==========================
   RIGHT PANEL (LOGIN FORM)
========================== */
.login-panel {
    flex: 2;
    background-color: var(--card-bg);
    padding: var(--spacing-lg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    width: 100%;
    max-width: 300px;
    text-align: center;
 	animation: fadeUp 700ms 60ms cubic-bezier(.2,.7,.2,1) both;
}

.logo {
	font-size: 42px;
	line-height: 1;
	margin-bottom: var(--spacing-sm);
}

.subtitle {
	color: var(--muted);
	font-size: 0.95em;
	margin-bottom: var(--spacing-lg);
}

.login-card h2 {
    font-family: var(--font-heading);
    font-weight: 700;
	color: var(--primary);
	font-size: 1.15em;
    text-transform: uppercase;
	letter-spacing: 0.12em;
    margin-bottom: var(--spacing-lg);
}

/* ==========================
   INPUT FIELDS
========================== */
input[type="text"],
input[type="password"] {
    width: 100%;
	padding: 12px 14px 12px 14px;
    margin-bottom: var(--spacing-md);
	border: 1px solid var(--input-border);
    border-radius: var(--radius-sm);
	background-color: var(--input-bg);
    font-weight: 500;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.06s ease;
}

.input-group {
	text-align: left;
	margin-bottom: var(--spacing-md);
}

.input-group label {
	display: inline-block;
	font-size: 0.9em;
	font-weight: 600;
	margin-bottom: 8px;
	color: var(--text-light);
}

input:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 4px var(--ring);
	background-color: var(--card-bg);
    outline: none;
}

input::placeholder {
	color: var(--muted);
	opacity: 0.9;
}

/* ==========================
   FORGOT PASSWORD LINK
========================== */
.forgot-password {
    display: block;
    margin-bottom: var(--spacing-md);
	color: var(--muted);
    font-size: 0.9em;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: var(--primary);
    text-decoration: underline;
}

.helper-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: var(--spacing-lg);
}

.remember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.9em;
	color: var(--text-light);
}

.remember input[type="checkbox"] {
	width: 16px;
	height: 16px;
}

/* ==========================
   BUTTON
========================== */
button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    font-weight: 700;
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
	background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
	transition: transform 0.06s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
	box-shadow: 0 6px 16px rgba(47, 125, 211, 0.35);
}

button[type="submit"]:hover {
	filter: brightness(1.02);
	transform: translateY(-1px);
}

button[type="submit"]:active {
	transform: translateY(0);
	box-shadow: 0 4px 10px rgba(47, 125, 211, 0.28);
}

button[type="submit"]:focus-visible {
	outline: none;
	box-shadow: 0 0 0 4px var(--ring), 0 6px 16px rgba(47, 125, 211, 0.35);
}

/* ==========================
   ERROR MESSAGE
========================== */
.error-message {
    color: var(--error);
    background-color: #fef0f0;
    border: 1px solid var(--error);
    padding: 8px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    font-size: 0.9em;
}

/* ==========================
	 ANIMATIONS & MOTION
========================== */
@keyframes fadeUp {
	0% {
		opacity: 0;
		transform: translateY(8px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* ==========================
   MEDIA QUERIES (RESPONSIVE)
========================== */
@media (max-width: 1024px) {
    .login-container {
        flex-direction: column;
        height: auto;
		border-radius: var(--radius-sm);
    }

    .graphic-panel {
        width: 100%;
        flex: none;
        height: 250px;
        padding: var(--spacing-lg) var(--spacing-md);
        justify-content: flex-end;
    }

    .graphic-panel::after {
        transform: skewY(0deg) scale(1.5);
        bottom: -50px;
		opacity: 0.3;
    }

    .login-panel {
        width: 100%;
        flex: none;
        min-height: 350px;
        padding: var(--spacing-lg) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .graphic-content h1 {
        font-size: 2em;
    }

    .login-card h2 {
        font-size: 1em;
    }

    input[type="text"],
    input[type="password"] {
        padding: 10px 10px 10px 35px;
    }

    button[type="submit"] {
        font-size: 1em;
        padding: 10px;
    }
}
