:root {
  --bg-color: #ffffff;
  --bg-secondary: #f9fafb; /* Light gray for the right side */
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --input-bg: #ffffff;
  --accent-color: #000000;
  --ring-color: rgba(0, 0, 0, 0.05);
  --radius: 0.5rem; /* Modern, slightly rounded corners */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- Main Layout: 50/50 Split --- */
.main-container {
  display: flex;
  min-height: 100vh;
}

/* Hide noscript element */
noscript {
	display: none;
}

/* --- Left Panel (Form) --- */
.left-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  position: relative;
  background-color: var(--bg-color);
}

/* Brand Logo (Absolute Position Top Left) */
.brand {
  position: absolute;
  top: 2rem;
  left: 2rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.brand-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background-color: var(--accent-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon svg {
  width: 14px;
  height: 14px;
}

/* Form Wrapper */
.form-container {
  width: 100%;
  max-width: 360px; /* Optimal width for readability */
  margin: 0 auto;
}

.form-header {
  margin-bottom: 2rem;
  text-align: left;
}

.form-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.025em;
}

.form-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Input Groups */
.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}

.input-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-field {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  background-color: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all 0.2s ease;
  outline: none;
}

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

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

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

/* Field Icons - Position and style SVG icons */
.field-icon {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	width: 1rem;
	height: 1rem;
	fill: currentColor; /* Inherit from text color for visibility */
	pointer-events: none;
	transition: fill 0.2s ease;
	z-index: 1;
}

.email-field .field-icon,
.password-field .field-icon {
	left: 0.75rem; /* Adjust position inside input fields */
}

.email-field .input-field {
	padding-left: 2.5rem;
}

.email-field .field-icon {
	top: 46%;
	transform: translateY(50%);
}

.password-field .input-field {
	padding-left: 2.5rem;
	padding-right: 3.5rem;
}

.password-field {
	position: relative;
}

.toggle-password {
    padding: 0.1rem 0.5rem;
    background: rgb(0 0 0 / 2%);
    border: solid #0000001f;
    border-radius: 20px;
    position: absolute;
    top: 21%;
    right: 0;
    transform: translateX(-10%);
    z-index: 2;
    font-size: small;
}

/* Modern Focus State */
.input-field:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px var(--ring-color);
}

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

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

/* Modern Focus State */
.input-field:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px var(--ring-color);
}

/* Actions Row (Forgot Password) */
.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.link-btn {
  font-size: 0.875rem;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.link-btn:hover {
  color: var(--text-secondary);
}

/* Main Login Button */
.btn-primary {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background-color: var(--accent-color);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.9;
}

/* --- Right Panel (Image) --- */
.right-panel {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 1rem;
}

.frame-panel {
  border-radius: 2rem;
  width: 100%;
  height: 100%;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  /* Slight darkening filter to match modern aesthetics */
  -webkit-filter: brightness(0.95);
          filter: brightness(0.95);
  border-radius: 2rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .right-panel {
    display: none;
  }

  .brand {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 2rem;
    align-self: flex-start; /* Align brand to start of form container */
  }

   .left-panel {
     justify-content: flex-start; /* Push content down on mobile */
     padding-top: 4rem;
   }
}

/* --- Footer Styling Override --- */

/* Toggle visibility between login and forgot password sections */
.for-login, .for-forgot {
	display: flex;
	width: 100%;
	min-height: 100vh;
}

.for-login.active, .for-forgot.active {
	display: flex;
	flex-direction: row;
}

/* Reduce footer padding */
.web-footer {
  display: none;  
	padding: 0 !important; /* Was: 3rem 0 = 48px, now: 8px */
	min-height: 0px !important; /* Was: 140px, now: 80px */
}

/* Reduce footer column padding */
.footer-col-left,
.footer-col-right {
	padding-top: 0 !important; /* Was: 0.8rem = ~13px */
	padding-bottom: 0 !important; /* Was: 1rem = 16px */
}

/* Reduce footer group margins */
.footer-group {
	margin-top: 0 !important; /* Was: 2rem = 32px */
	margin-bottom: 0 !important;
}

/* Reduce footer logo height */
.footer-logo {
	height: 0 !important; /* Was: 1.5rem */
}
