:root {
    --moh-green: #198a3a;
    --moh-green-dark: #106327;
    --moh-green-darker: #0c4a1e;
    --moh-red: #d1262f;
    --moh-black: #111111;
    --moh-orange: #f58c1f;
    --moh-ink: #1e2a1f;
    --moh-muted: #5c6b5e;
    --moh-line: #d8e4ef;
    --moh-panel: #ffffff;
    --moh-warn: #fff2e2;
    --moh-warn-line: #ffd4a3;
    --moh-radius: 1rem;
    --moh-radius-sm: 0.6rem;
}

* { box-sizing: border-box; }

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

body {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--moh-ink);
    background: #f4f6f5;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ---------- backdrop ---------- */
.mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.mesh::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(255,255,255,0.9), transparent 34%),
        linear-gradient(160deg, #f7f9f8 0%, #eef2ef 55%, #e6ece8 100%);
}

.mesh-grid {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 58%;
    background: var(--moh-green-darker);
    border-top-left-radius: 52% 90px;
    border-top-right-radius: 52% 90px;
}

.mesh-grid::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.10;
    background-image:
        linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.5) 50%, transparent 50%),
        linear-gradient(-45deg, transparent 45%, rgba(255,255,255,0.5) 45%, rgba(255,255,255,0.5) 50%, transparent 50%);
    background-size: 34px 34px;
}

/* ---------- header ---------- */
.header {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: clamp(8px, 2.6vh, 36px) 20px 0;
    flex: 0 0 auto;
}

.header img {
    width: clamp(44px, 7vh, 100px);
    height: clamp(44px, 7vh, 100px);
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
}

.header .country {
    margin: clamp(4px, 1.5vh, 14px) 0 0;
    font-size: clamp(0.85rem, 1.6vh, 1.2rem);
    color: var(--moh-green-dark);
    font-weight: 500;
}

.header .ministry {
    margin: 2px 0 clamp(4px, 1.5vh, 14px);
    font-size: clamp(1.05rem, 2.1vh, 1.55rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--moh-green-darker);
    text-transform: uppercase;
}

.flag-underline {
    width: min(300px, 70vw);
    height: 4px;
    margin: 0 auto;
    border-radius: 3px;
    overflow: hidden;
    display: flex;
}

.flag-underline span { flex: 1; }
.flag-underline span:nth-child(1) { background: var(--moh-green); }
.flag-underline span:nth-child(2) { background: var(--moh-black); }
.flag-underline span:nth-child(3) { background: var(--moh-red); }
.flag-underline span:nth-child(4) { background: var(--moh-orange); }

/* ---------- card ---------- */
.card-wrap {
    position: relative;
    z-index: 2;
    max-width: 480px;
    width: 100%;
    margin: clamp(6px, 2vh, 24px) auto 0;
    padding: 0 20px;
    flex: 0 0 auto;
    min-height: 0;
}

.card {
    background: #ffffff;
    border-radius: var(--moh-radius);
    box-shadow: 0 24px 60px rgba(12, 44, 20, 0.22);
    padding: clamp(14px, 3vh, 40px) clamp(20px, 4vw, 36px) clamp(12px, 2.4vh, 32px);
}

.moh-welcome {
    text-align: center;
    margin: 0 0 clamp(10px, 3vh, 26px);
}

.moh-welcome-title {
    margin: 0 0 6px;
    font-size: clamp(1.3rem, 3vh, 1.7rem);
    font-weight: 800;
    color: var(--moh-green-dark);
}

.moh-welcome-subtitle {
    margin: 0;
    color: var(--moh-muted);
    font-size: 0.96rem;
}

.moh-alert {
    margin: 0 0 clamp(10px, 2vh, 18px);
    padding: 12px 14px;
    border-radius: var(--moh-radius-sm);
    font-size: 0.9rem;
}

.moh-alert-error {
    background: #fdecea;
    border: 1px solid #f5c2bf;
    color: #8a2a24;
}

.moh-alert-success {
    background: #eaf6ee;
    border: 1px solid #bfe5cc;
    color: #1e5f34;
}

.moh-alert-warning,
.moh-alert-info {
    background: var(--moh-warn);
    border: 1px solid var(--moh-warn-line);
    color: #6a4c24;
}

.field { margin-bottom: clamp(10px, 2.2vh, 18px); }

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1f2937;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: var(--moh-red);
    font-size: 0.84rem;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--moh-line);
    border-radius: var(--moh-radius-sm);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap:focus-within {
    border-color: var(--moh-green);
    box-shadow: 0 0 0 3px rgba(25, 138, 58, 0.14);
}

.input-wrap .icon {
    flex: none;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa5a0;
}

.input-wrap input {
    flex: 1;
    border: 0;
    outline: none;
    padding: clamp(9px, 1.8vh, 13px) 8px clamp(9px, 1.8vh, 13px) 0;
    font-size: 0.96rem;
    background: transparent;
    color: var(--moh-ink);
    min-width: 0;
}

.input-wrap .toggle {
    flex: none;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa5a0;
    cursor: pointer;
    background: none;
    border: 0;
}

.input-wrap .toggle.is-visible { color: var(--moh-green); }

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -4px 0 clamp(10px, 2.2vh, 18px);
    font-size: 0.86rem;
}

.remember-check {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--moh-muted);
    cursor: pointer;
}

.remember-row a {
    color: var(--moh-green-dark);
    text-decoration: none;
}

.remember-row a:hover { text-decoration: underline; }

.btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--moh-radius-sm);
    padding: clamp(10px, 2vh, 14px);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: 0;
    transition: transform 0.12s ease, background 0.15s ease;
    text-decoration: none;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: var(--moh-green-dark);
    color: #fff;
    margin-top: 6px;
}

.btn-primary:hover { background: var(--moh-green-darker); }

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: clamp(10px, 2.2vh, 18px) 0;
    color: #9aa5a0;
    font-size: 0.85rem;
}

.divider::before, .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--moh-line);
}

.btn-outline {
    background: #fff;
    color: var(--moh-green-dark);
    border: 1.5px solid var(--moh-green);
    margin-top: 10px;
}

.btn-outline:hover { background: rgba(25, 138, 58, 0.06); }

.moh-register {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--moh-muted);
}

.moh-register a {
    color: var(--moh-green-dark);
    font-weight: 700;
    text-decoration: none;
}

/* ---------- footer ---------- */
.footer {
    position: relative;
    z-index: 2;
    max-width: 480px;
    width: 100%;
    margin: clamp(6px, 1.8vh, 18px) auto 0;
    padding: 0 20px clamp(8px, 2.6vh, 40px);
    text-align: center;
    color: #dcebe0;
    flex: 0 0 auto;
    min-height: 0;
    overflow: hidden;
}

.footer .shield {
    width: clamp(20px, 4vh, 30px);
    height: clamp(20px, 4vh, 30px);
    margin: 0 auto clamp(4px, 1.5vh, 10px);
    color: rgba(255,255,255,0.85);
}

.footer .tagline {
    font-size: clamp(0.8rem, 1.8vh, 0.92rem);
    color: #dcebe0;
    margin: 0 0 clamp(8px, 2.5vh, 18px);
}

.footer hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.18);
    margin: 0 0 clamp(8px, 2.5vh, 18px);
}

.footer-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    font-size: 0.84rem;
    margin-bottom: clamp(8px, 2.5vh, 18px);
}

.footer-links > div {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.footer-links .icon-circle {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: 1.4px solid rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.footer-links strong {
    display: block;
    color: #fff;
    font-weight: 700;
}

.footer-links span {
    color: #c9ddce;
    font-size: 0.8rem;
}

.footer-copy {
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-top: clamp(8px, 2vh, 16px);
    font-size: 0.82rem;
    color: #b9d2bf;
}

@media (max-width: 480px) {
    .footer-links { flex-direction: column; gap: 14px; }
}
