:root {
  --primary-green: #164320;
  --accent-green: #3ccb46;
  --brand-meero: #20a038;
  --brand-link: #1c60be;
  --light-mint: #e8f3e9;
  --card-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #d1d5db;
  --btn-green: #90c297;
  --btn-green-hover: #7eb385;
  --info-bg: #e0edfa;
  --info-text: #1e40af;
  --info-icon: #3b82f6;
  --text-dark: #18181b;
  --text-muted: #71717a;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;
}

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

html, body {
  height: 100%;
  font-family: var(--font-body);
  background: var(--primary-green);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Overall Split Layout */
.login-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--primary-green);
  overflow: hidden;
}

/* Left Dark Green Sidebar */
.hero-sidebar {
  width: 380px;
  min-width: 340px;
  background-color: var(--primary-green);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 36px 0;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.hero-header {
  margin-bottom: 20px;
}

.meero-labs-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  display: block;
}

.hero-content {
  margin-top: 50px;
  margin-bottom: 10px;
  z-index: 3;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero-content h1 .highlight {
  color: var(--accent-green);
}

.hero-content p {
  font-size: 15px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 400;
}

/* Farmer Image & Background Graphic */
.hero-farmer-wrapper {
  position: relative;
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  margin-left: -36px;
  margin-right: -36px;
  width: calc(100% + 72px);
  height: 350px;
  overflow: hidden;
  z-index: 1;
}

.farmer-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 15%);
}

/* Main Mint Green Content Area with Curved Overlay */
.main-content {
  flex: 1;
  background-color: var(--light-mint);
  border-top-left-radius: 28px;
  border-bottom-left-radius: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3;
  margin-top: 0;
  overflow: hidden;
}

/* Centered Login Card Container */
.card-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 80px;
  z-index: 2;
}

.login-card {
  background: var(--card-bg);
  width: 100%;
  max-width: 440px;
  border-radius: 20px;
  padding: 40px 42px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
}

.card-header {
  margin-bottom: 25px;
}

.meerolink-logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
  display: block;
}

.card-welcome {
  margin-bottom: 24px;
}

.card-welcome .greeting {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}

.card-welcome .title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.card-welcome .supporting-text {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Form Controls with Fieldset & Legend */
.login-form {
  display: flex;
  flex-direction: column;
}

fieldset.form-group {
  border: 1px solid var(--input-border);
  border-radius: 8px;
  padding: 0 12px;
  margin-bottom: 20px;
  background: var(--input-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

fieldset.form-group legend {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0 6px;
  margin-left: 6px;
}

fieldset.form-group input {
  width: 100%;
  height: 38px;
  border: none;
  background: transparent;
  padding: 0 4px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text-dark);
  outline: none;
}

fieldset.form-group input::placeholder {
  color: #a1a1aa;
}

fieldset.form-group:focus-within {
  border-color: #20a038;
  box-shadow: 0 0 0 3px rgba(32, 160, 56, 0.12);
}

fieldset.form-group.has-error {
  border-color: #ef4444;
  background: #fef2f2;
}

.error-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Submit Proceed Button */
.btn-proceed {
  width: 100%;
  height: 48px;
  background: var(--btn-green);
  color: #ffffff;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  margin-top: 4px;
  margin-bottom: 16px;
}

.btn-proceed:hover {
  background: var(--btn-green-hover);
}

.btn-proceed:active {
  transform: scale(0.99);
}

/* Info Box */
.info-box {
  background: var(--info-bg);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.info-icon {
  color: var(--info-icon);
  display: flex;
  align-items: center;
}

.info-text {
  font-size: 13px;
  color: var(--info-text);
  font-weight: 500;
}

/* Security Note */
.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #6b7280;
  font-size: 13px;
  margin-top: 4px;
}

.security-note svg {
  color: #6b7280;
}

.otp-actions {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.link-change-login {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-link);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.link-change-login:hover {
  text-decoration: underline;
}

/* Watermark Leaf */
.bg-watermark-leaf {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 450px;
  height: 450px;
  pointer-events: none;
  z-index: 1;
}

/* Footer Bar */
.login-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  font-size: 13px;
  color: #4b5563;
  z-index: 3;
}

.footer-contact {
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-name {
  font-weight: 600;
  color: #1f2937;
}

.separator {
  color: #d1d5db;
}

.phone-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.2s;
}

.phone-link:hover {
  color: var(--brand-link);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .hero-sidebar {
    display: none;
  }
  
  .main-content {
    border-top-left-radius: 0;
  }

  .login-footer {
    position: relative;
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 8px;
    text-align: center;
  }
}
