/* Graxynet JNSPS Green V2.1.48
 * Premium login panel + compact, equal archive cards.
 * Frontend-only CSS; no OJS core/database changes.
 */

/* ================================================================
   LOGIN — focused, modern authentication card
   ================================================================ */
html body .page_login {
    --jnsps-login-green: var(--jnsps-primary, #0b7a3d);
    --jnsps-login-dark: var(--jnsps-dark, #075e31);
    --jnsps-login-accent: var(--jnsps-accent, #2aa869);
    --jnsps-login-border: #d8e9df;
    --jnsps-login-muted: #617267;
}

/* Make the login title part of a coherent visual block rather than a bare heading. */
html body .page_login > .page_title {
    max-width: 760px !important;
    margin: 0 auto 14px !important;
    padding: 24px 28px 22px 78px !important;
    border: 1px solid var(--jnsps-login-border) !important;
    border-radius: 20px 20px 12px 12px !important;
    background:
        radial-gradient(circle at 92% 18%, rgba(42,168,105,.13), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #f4fbf7 100%) !important;
    box-shadow: 0 14px 34px rgba(7,94,49,.08) !important;
    color: #12271b !important;
    font-size: clamp(28px, 3vw, 36px) !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    letter-spacing: -.02em !important;
}

html body .page_login > .page_title::before {
    content: "\f2f6" !important;
    font-family: "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
    display: grid !important;
    place-items: center !important;
    position: absolute !important;
    left: 24px !important;
    top: 50% !important;
    width: 40px !important;
    height: 40px !important;
    transform: translateY(-50%) !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--jnsps-login-dark), var(--jnsps-login-green)) !important;
    color: #fff !important;
    font-size: 18px !important;
    box-shadow: 0 8px 18px rgba(7,94,49,.20) !important;
}

/* The small required-fields note sits neatly between heading and card. */
html body .page_login > .page_title + p,
html body .page_login > p:first-of-type {
    max-width: 760px !important;
    margin: 0 auto 10px !important;
    color: var(--jnsps-login-muted) !important;
    font-size: 13px !important;
}

html body .page_login form {
    position: relative !important;
    max-width: 760px !important;
    margin: 0 auto 28px !important;
    padding: 30px 32px 28px !important;
    border: 1px solid var(--jnsps-login-border) !important;
    border-radius: 12px 12px 22px 22px !important;
    background:
        linear-gradient(180deg, rgba(244,251,247,.86) 0, #fff 78px),
        #fff !important;
    box-shadow: 0 18px 44px rgba(7,94,49,.10) !important;
    overflow: hidden !important;
}

html body .page_login form::before {
    content: "Secure journal access" !important;
    display: block !important;
    margin: -4px 0 22px !important;
    color: var(--jnsps-login-dark) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
}

/* OJS may use fields, field groups, or direct labels depending on template version. */
html body .page_login form .fields,
html body .page_login form .field,
html body .page_login form .form-group,
html body .page_login form > div {
    max-width: 100% !important;
}

html body .page_login form label {
    display: block !important;
    margin: 0 0 8px !important;
    color: #24382c !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

html body .page_login input[type="text"],
html body .page_login input[type="email"],
html body .page_login input[type="password"] {
    width: 100% !important;
    max-width: none !important;
    min-height: 48px !important;
    padding: 10px 14px !important;
    border: 1px solid #c9ddd0 !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: #17271e !important;
    font-size: 15px !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease !important;
}

html body .page_login input[type="text"]:focus,
html body .page_login input[type="email"]:focus,
html body .page_login input[type="password"]:focus {
    border-color: var(--jnsps-login-green) !important;
    box-shadow: 0 0 0 4px rgba(11,122,61,.11) !important;
    outline: none !important;
}

html body .page_login .remember,
html body .page_login .remember_me,
html body .page_login label[for*="remember" i] {
    color: #475c50 !important;
    font-weight: 600 !important;
}

html body .page_login input[type="checkbox"] {
    accent-color: var(--jnsps-login-green) !important;
}

html body .page_login a {
    color: var(--jnsps-link, #006fe6) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
html body .page_login a:hover,
html body .page_login a:focus {
    text-decoration: underline !important;
}

html body .page_login button,
html body .page_login input[type="submit"],
html body .page_login .submit button {
    min-width: 112px !important;
    min-height: 46px !important;
    padding: 10px 22px !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, var(--jnsps-login-dark), var(--jnsps-login-green)) !important;
    color: #fff !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 22px rgba(7,94,49,.18) !important;
    transition: transform .18s ease, box-shadow .18s ease !important;
}
html body .page_login button:hover,
html body .page_login button:focus,
html body .page_login input[type="submit"]:hover,
html body .page_login input[type="submit"]:focus {
    transform: translateY(-1px) !important;
    box-shadow: 0 13px 26px rgba(7,94,49,.24) !important;
}

/* ================================================================
   ARCHIVE — equal cards with concise previews
   ================================================================ */
html body .page_issue_archive .issues_archive {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 20px !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .page_issue_archive .issues_archive > li {
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

html body .page_issue_archive .obj_issue_summary {
    position: relative !important;
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 300px !important;
    margin: 0 !important;
    padding: 22px 22px 20px !important;
    border: 1px solid #d6e8dd !important;
    border-left: 5px solid var(--jnsps-primary, #0b7a3d) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, #fff 0%, #fbfefc 100%) !important;
    box-shadow: 0 12px 30px rgba(7,94,49,.07) !important;
    overflow: hidden !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

html body .page_issue_archive .obj_issue_summary:hover {
    transform: translateY(-2px) !important;
    border-color: #bdddc9 !important;
    box-shadow: 0 16px 34px rgba(7,94,49,.11) !important;
}

html body .page_issue_archive .obj_issue_summary .title {
    margin: 0 0 10px !important;
}
html body .page_issue_archive .obj_issue_summary .title,
html body .page_issue_archive .obj_issue_summary .title a {
    color: var(--jnsps-dark, #075e31) !important;
    font-size: 19px !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}
html body .page_issue_archive .obj_issue_summary .title a {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
}

/* Clamp long issue descriptions so one verbose issue cannot dominate the archive. */
html body .page_issue_archive .obj_issue_summary .description {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 7 !important;
    overflow: hidden !important;
    margin: 0 !important;
    color: #5c6f63 !important;
    font-size: 14px !important;
    line-height: 1.72 !important;
    max-height: calc(1.72em * 7) !important;
}

/* Rich text inside the description should not break the clamp visually. */
html body .page_issue_archive .obj_issue_summary .description p,
html body .page_issue_archive .obj_issue_summary .description div,
html body .page_issue_archive .obj_issue_summary .description span {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

html body .page_issue_archive .obj_issue_summary::after {
    content: "View issue  →" !important;
    display: block !important;
    margin-top: auto !important;
    padding-top: 16px !important;
    color: var(--jnsps-primary, #0b7a3d) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    letter-spacing: .01em !important;
}

/* Three columns only where there is genuinely enough room; otherwise keep two. */
@media (min-width: 1500px) {
    html body .page_issue_archive .issues_archive {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    html body .page_issue_archive .issues_archive {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    html body .page_issue_archive .obj_issue_summary {
        min-height: 0 !important;
    }
}

@media (max-width: 767px) {
    html body .page_login > .page_title {
        padding: 20px 20px 20px 66px !important;
        border-radius: 16px 16px 10px 10px !important;
        font-size: 27px !important;
    }
    html body .page_login > .page_title::before {
        left: 18px !important;
        width: 36px !important;
        height: 36px !important;
    }
    html body .page_login form {
        padding: 24px 18px 22px !important;
        border-radius: 10px 10px 18px 18px !important;
    }
    html body .page_login button,
    html body .page_login input[type="submit"],
    html body .page_login .submit button {
        width: 100% !important;
    }
}
