/* FertAfrica — shared look for the portal sign-in pages.
   Loaded last, on top of the existing theme CSS. */
body.login {
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif !important;
    color: #1b2420;
    background: linear-gradient(135deg, #063d1b 0%, #0b5d2a 55%, #1f7a3c 100%) fixed !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}
body.login > .row,
body.login > .container { width: 100%; margin: 0; }

body.login .main-login {
    float: none !important;
    width: 100% !important;
    max-width: 440px;
    margin: 0 auto !important;
}
body.login .main-login > .logo,
body.login .logo { margin: 0 !important; padding: 0 !important; }

/* Card */
body.login .main-login,
body.login .auth-form-light.rounded {
    background: #fff !important;
    border-radius: 18px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25) !important;
    padding: 36px 32px 28px !important;
    max-width: 440px;
}
body.login .main-login .auth-form-light { background: transparent !important; padding: 0 0 8px !important; box-shadow: none !important; }
body.login .box-login { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }

/* Brand */
body.login .brand-logo img,
body.login img.brand-logo { height: 64px; width: auto; margin: 0 auto 12px; display: block; }
body.login h2 {
    font-family: "Fraunces", Georgia, serif !important;
    font-size: 1.6rem !important;
    font-weight: 700 !important;
    color: #1b2420 !important;
    margin: 0 0 4px !important;
    text-align: center;
}
body.login h2 a, body.login a h2 { color: #1b2420 !important; text-decoration: none; }
body.login fieldset { border: 0 !important; padding: 0 !important; margin: 0 !important; background: none !important; }
body.login legend {
    border: 0 !important;
    font-size: 1rem !important;
    font-weight: 600;
    color: #5b6862 !important;
    text-align: center;
    width: 100% !important;
    position: static !important;
    padding: 0 !important;
    background: none !important;
    font-family: inherit !important;
    margin: 0 0 6px !important;
}
body.login fieldset > p,
body.login .text-muted { color: #5b6862 !important; font-size: .92rem; text-align: center; }

/* Fields */
body.login .form-group { margin-bottom: 16px; }
body.login .form-control {
    height: auto !important;
    font: inherit !important;
    font-size: 1rem !important;
    padding: .8em .95em .8em 2.6em !important;
    border: 1px solid #cfd8d2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #1b2420 !important;
}
body.login .input-group .form-control { padding-left: .95em !important; border-radius: 0 10px 10px 0 !important; }
body.login .input-group-text { background: #f5f8f3; border-color: #cfd8d2; border-radius: 10px 0 0 10px; color: #0b5d2a; }
body.login .form-control:focus { border-color: #0b5d2a !important; box-shadow: 0 0 0 3px rgba(11, 93, 42, .15) !important; outline: none; }
body.login .input-icon > i { color: #0b5d2a !important; top: 50% !important; transform: translateY(-50%); left: 14px !important; }

/* Links */
body.login a { color: #0b5d2a; font-weight: 500; }
body.login a:hover { color: #e8590c; }

/* Button */
body.login .btn-primary {
    float: none !important;
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: .85em 1.2em !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #e8590c !important;
    color: #fff !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    box-shadow: none !important;
    transition: background .2s;
}
body.login .btn-primary:hover, body.login .btn-primary:focus { background: #c44a08 !important; }

body.login .new-account,
body.login .form-group.text-muted { text-align: center; margin-top: 18px; font-size: .92rem; color: #5b6862; }
body.login .copyright,
body.login .text-center.mt-3 {
    margin-top: 22px !important;
    padding-top: 16px;
    border-top: 1px solid #e3e8e4;
    text-align: center;
    font-size: .78rem;
    color: #8a958f !important;
    text-transform: none !important;
}
body.login .copyright .text-uppercase,
body.login .text-center.mt-3 .text-uppercase { text-transform: none !important; font-weight: 400; }

.back-home { display: block; text-align: center; margin-top: 18px; color: rgba(255, 255, 255, .85) !important; text-decoration: none; font-size: .9rem; }
.back-home:hover { color: #fff !important; }

body.login .error-message { color: #a12a1a; background: #fdecea; border-radius: 10px; padding: .6em .9em; font-size: .9rem; margin: 12px 0 0; }
body.login .box-login fieldset > a { display: block; text-align: center; margin-top: 16px; font-size: .92rem; }
body.login .error-message:empty { display: none; }

/* ---------- Dark mode (default; follows the choice made on the homepage) ---------- */
html[data-theme="dark"] body.login { background: linear-gradient(135deg, #050b08 0%, #0b1a12 55%, #123020 100%) fixed !important; color: #e7eee9; }
html[data-theme="dark"] body.login .main-login,
html[data-theme="dark"] body.login .auth-form-light.rounded { background: #17221c !important; box-shadow: 0 20px 60px rgba(0, 0, 0, .55) !important; }
html[data-theme="dark"] body.login h2,
html[data-theme="dark"] body.login h2 a,
html[data-theme="dark"] body.login a h2 { color: #e7eee9 !important; }
html[data-theme="dark"] body.login legend,
html[data-theme="dark"] body.login fieldset > p,
html[data-theme="dark"] body.login .text-muted,
html[data-theme="dark"] body.login .new-account { color: #a7b6ad !important; }
html[data-theme="dark"] body.login .form-control { background: #0f1814 !important; border-color: #3a4a42 !important; color: #e7eee9 !important; }
html[data-theme="dark"] body.login .form-control:focus { border-color: #6fd39a !important; box-shadow: 0 0 0 3px rgba(111, 211, 154, .2) !important; }
html[data-theme="dark"] body.login .input-group-text { background: #121c17; border-color: #3a4a42; color: #6fd39a; }
html[data-theme="dark"] body.login .input-icon > i { color: #6fd39a !important; }
html[data-theme="dark"] body.login a { color: #6fd39a; }
html[data-theme="dark"] body.login .copyright,
html[data-theme="dark"] body.login .text-center.mt-3 { border-top-color: #2b3832; color: #8a978f !important; }
html[data-theme="dark"] body.login .error-message { background: #3a1914; color: #ffc9bf; }
html[data-theme="dark"] .fa-back-home { background: rgba(23, 34, 28, .95) !important; color: #6fd39a !important; }
