:root {
    --lg-navy: #3d4f6d;        /* header background */
    --lg-navy-dark: #2c3a52;
    --lg-primary: #3ba4d8;     /* header accent (Home link / Login outline) */
    --lg-primary-dark: #2b8bbd;
    --lg-ink: #1f2937;
    --lg-muted: #6b7280;
    --lg-border: #e5e7eb;
    --lg-bg: #f3f4fa;
  }

  .lg-wrap {
    background: linear-gradient(135deg, #eefaff 0%, var(--lg-bg) 50%, #f1f0fb 100%);
    padding: 70px 0 90px;
    min-height: 70vh;
  }

  .lg-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(44, 58, 82, .18);
  }

  /* ---------- Left brand panel ---------- */
  .lg-brand {
    position: relative;
    background: linear-gradient(160deg, var(--lg-navy) 0%, var(--lg-navy-dark) 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
  }
  .lg-brand::before,
  .lg-brand::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 164, 216, .14);
  }
  .lg-brand::before { width: 260px; height: 260px; top: -80px; right: -80px; }
  .lg-brand::after  { width: 200px; height: 200px; bottom: -70px; left: -60px; }

  .lg-brand img {
    position: relative;
    z-index: 1;
    max-width: 70%;
    max-height: 240px;
    object-fit: contain;
    background: #fff;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 28px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .25));
  }
  .lg-brand h2 { position: relative; z-index: 1; font-size: 26px; font-weight: 700; margin-bottom: 10px; color: #fff; }
  .lg-brand p  { position: relative; z-index: 1; margin: 0; font-size: 15px; opacity: .9; }

  /* ---------- Right form panel ---------- */
  .lg-form-panel { padding: 52px 48px; }
  .lg-form-panel h3 { font-size: 28px; font-weight: 700; color: var(--lg-navy); margin-bottom: 6px; }
  .lg-form-panel .lg-sub { color: var(--lg-muted); margin-bottom: 28px; font-size: 15px; }

  .lg-field { margin-bottom: 20px; }
  .lg-field label { display: block; font-size: 13px; font-weight: 600; color: var(--lg-navy); margin-bottom: 6px; }

  .lg-input-group { position: relative; }
  .lg-input-group > .lg-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: #9ca3af; pointer-events: none;
  }
  .lg-input-group .form-control {
    height: 50px;
    padding-left: 44px;
    border: 1.5px solid var(--lg-border);
    border-radius: 12px;
    font-size: 15px;
    background: #fafafa;
    transition: all .2s;
  }
  .lg-input-group .form-control:focus {
    background: #fff;
    border-color: var(--lg-primary);
    box-shadow: 0 0 0 4px rgba(59, 164, 216, .22);
  }
  .lg-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: 0; padding: 8px; color: #9ca3af; cursor: pointer; line-height: 0;
  }
  .lg-toggle:hover { color: var(--lg-primary); }
  .lg-input-group.has-toggle .form-control { padding-right: 46px; }

  .help-block { display: block; color: #dc2626; font-size: 12.5px; margin-top: 6px; }

  /* Captcha */
  .lg-captcha { display: flex; align-items: center; gap: 10px; }
  .lg-captcha-img {
    border: 1.5px solid var(--lg-border); border-radius: 12px; background: #fff;
    padding: 4px 8px; display: flex; align-items: center; flex-shrink: 0;
  }
  .lg-captcha-img img { height: 38px; display: block; }
  .lg-captcha .form-control {
    height: 50px; flex: 1; min-width: 0; border: 1.5px solid var(--lg-border);
    border-radius: 12px; background: #fafafa; letter-spacing: 2px; padding: 0 14px;
  }
  .lg-captcha .form-control:focus {
    background: #fff; border-color: var(--lg-primary); box-shadow: 0 0 0 4px rgba(59, 164, 216, .22);
  }
  .lg-refresh {
    flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%;
    border: 1.5px solid var(--lg-border); background: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all .25s;
  }
  .lg-refresh:hover { border-color: var(--lg-primary); transform: rotate(180deg); }
  .lg-refresh svg { width: 22px; height: 22px; fill: var(--lg-primary); }

  /* Submit */
  .lg-submit {
    width: 100%; height: 52px; margin-top: 8px; border: 2px solid var(--lg-navy); border-radius: 12px;
    background: linear-gradient(135deg, var(--lg-navy), var(--lg-navy-dark));
    color: #fff; font-size: 16px; font-weight: 600; letter-spacing: .3px; cursor: pointer;
    box-shadow: 0 8px 20px rgba(61, 79, 109, .35); transition: transform .15s, box-shadow .15s, border-color .15s;
  }
  .lg-submit:hover {
    transform: translateY(-2px);
    border-color: var(--lg-primary);
    box-shadow: 0 12px 26px rgba(61, 79, 109, .45);
  }
  .lg-submit:active { transform: translateY(0); }
  .lg-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }

  .lg-alert {
    display: flex; align-items: center; gap: 10px;
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 22px;
  }

  /* Label row with "Forgot password?" link */
  .lg-label-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
  .lg-label-row label { margin-bottom: 0; }
  .lg-forgot { font-size: 13px; font-weight: 600; color: var(--lg-primary-dark); text-decoration: none; }
  .lg-forgot:hover { color: var(--lg-navy); text-decoration: underline; }

  /* BootstrapValidator messages (shown right under each field) */
  .lg-field .help-block { display: block; color: #dc2626; font-size: 12.5px; margin: 6px 0 0; }
  .lg-field.has-error .form-control { border-color: #dc2626; background: #fff; }
  .lg-field.has-error .form-control:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); }
  .lg-field .form-control-feedback { display: none !important; }

  @media (max-width: 991px) {
    .lg-wrap { padding: 30px 0 50px; }
    .lg-form-panel { padding: 36px 24px; }
  }
  @media (max-width: 420px) {
    .lg-captcha { flex-wrap: wrap; }
    .lg-captcha .form-control { flex: 1 1 100%; order: 3; }
  }