  :root {
    --navy-dark: #082C47;
    --navy: #0B3D62;
    --gold: #C9A227;
    --gold-light: #E4C567;
    --leaf: #4C8C4A;
    --leaf-light: #6FAF6C;
    --bg: #F5F7FA;
    --text: #1E293B;
    --muted: #64748B;
    --success: #15803D;
    --error: #DC2626;
    --radius: 0.75rem;
  }

  html,
  body {
    height: 100%;
    margin: 0;
  }

  body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--bg);
    font-family: 'Inter', sans-serif;
    color: var(--text);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  .brand-panel__title {
    font-family: 'Poppins', sans-serif;
  }

  /* ---------- Login section wrapper ---------- */
  .login-page {
    flex: 1;
    display: flex;
    min-height: 0;
  }

  /* ---------- Left brand panel (desktop only) ---------- */
  .brand-panel {
    display: none;
    position: relative;
    flex: 1 1 42%;
    color: #fff;
    overflow: hidden;
    align-items: flex-end;
    padding: 3rem;
    box-sizing: border-box;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);

    /*
      To use a real farm photo instead, replace the line above with:
      background:
        linear-gradient(180deg, rgba(8,44,71,0.55) 0%, rgba(8,44,71,0.92) 100%),
        url('images/farm-hero.jpg') center/cover no-repeat;
    */
  }

  .brand-panel__sun {
    position: absolute;
    top: 3.5rem;
    right: 3.5rem;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold) 70%);
    opacity: 0.9;
    filter: blur(0.5px);
  }

  .brand-panel__field {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 46%;
    background: repeating-linear-gradient(100deg,
        rgba(76, 140, 74, 0.55) 0px,
        rgba(76, 140, 74, 0.55) 18px,
        rgba(111, 175, 108, 0.4) 18px,
        rgba(111, 175, 108, 0.4) 36px);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 35%);
    opacity: 0.9;
  }

  .brand-panel__content {
    position: relative;
    z-index: 1;
    max-width: 380px;
  }

  .brand-panel__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-light);
    font-weight: 600;
    margin-bottom: 1rem;
  }

  .brand-panel__eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--gold);
    display: inline-block;
  }

  .brand-panel__title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
  }

  .brand-panel__desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
  }

  /* ---------- Right form panel ---------- */
  .form-panel {
    flex: 1 1 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    box-sizing: border-box;
  }

  .login-card {
    width: 100%;
    max-width: 400px;
  }

  .login-card__eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.35rem;
  }

  .login-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--navy-dark);
  }

  /* ---------- Tabs ---------- */
  #loginTabs {
    border-bottom: 1.5px solid #E2E8F0;
    flex-wrap: nowrap;
    margin-bottom: 1.75rem !important;
  }

  #loginTabs .nav-item {
    flex: 1 1 50%;
  }

  #loginTabs .nav-link {
    width: 100%;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 0.5rem;
    border-radius: 0;
    background: transparent;
  }

  #loginTabs .nav-link.active {
    color: var(--navy);
    border-bottom-color: var(--navy);
  }

  .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.4rem;
  }

  .form-control {
    border: 1.5px solid #E2E8F0;
    border-radius: 0.5rem;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .form-control:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(11, 61, 98, 0.12);
  }

  .btn-primary-custom {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: background 0.15s ease, transform 0.05s ease;
  }

  .btn-primary-custom:hover {
    background: var(--navy-dark);
    color: #fff;
  }

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

  .btn-primary-custom:disabled {
    background: #94A3B8;
    cursor: not-allowed;
  }

  .btn-link-custom {
    color: var(--navy);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
  }

  .btn-link-custom:hover {
    color: var(--navy-dark);
    text-decoration: underline;
  }

  .helper-text {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 0.5rem;
  }

  /* ---------- OTP digit boxes (signature element) ---------- */
  .otp-boxes {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
  }

  .otp-digit {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 52px;
    text-align: center;
    font-family: 'Roboto Mono', monospace;
    font-size: 1.25rem;
    font-weight: 500;
    border: 1.5px solid #E2E8F0;
    border-radius: 0.5rem;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
  }

  .otp-digit:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
    outline: none;
  }

  #msg:empty {
    display: none;
  }

  #msg.text-success {
    color: var(--success);
    font-weight: 500;
    font-size: 0.9rem;
  }

  #msg.text-danger {
    color: var(--error);
    font-weight: 500;
    font-size: 0.9rem;
  }

  /* ---------- Responsive ---------- */
  @media (min-width: 992px) {
    .brand-panel {
      display: flex;
    }
  }

  @media (max-width: 480px) {
    .login-card__title {
      font-size: 1.3rem;
    }

    .otp-digit {
      font-size: 1.1rem;
    }

    #loginTabs .nav-link {
      font-size: 0.8rem;
      padding: 0.5rem 0.25rem;
    }
  }
