
:root {
    --primary: #17a2b8;
    --primary-dark: #138b9e;
    --primary-soft: #e7f7fa;
    --page-bg: #f3f5f8;
    --surface: #ffffff;
    --text: #243447;
    --muted: #6c7a89;
    --border: #dfe6ec;
    --shadow: 0 2px 7px rgba(30, 55, 75, .10);
    --radius: 7px;
    --container: 1510px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    position: relative;
    z-index: 100;
    width: 100%;
    color: #fff;
    background: var(--primary);
    border-bottom: 1px solid rgba(255,255,255,.18);
}

.navbar {
    width: min(100% - 40px, var(--container));
    min-height: 75px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    color: #fff;
}

.brand-logo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    overflow: hidden;
    border-radius: 50%;
    background: #fff;
    border: 2px solid rgba(255,255,255,.8);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-fallback {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.brand-text strong {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -.35px;
}

.brand-text small {
    margin-top: 3px;
    color: rgba(255,255,255,.88);
    font-size: 11px;
}

.main-navigation {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 4px;
    min-height: 75px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    color: #fff;
    font-size: 16px;
    white-space: nowrap;
    transition: background .2s ease;
}

.nav-link i {
    font-size: 16px;
}

.nav-link:hover,
.nav-link.active {
    color: #fff;
    background: rgba(0, 0, 0, .12);
}

.nav-account {
    margin-left: 5px;
    font-weight: 700;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 5px;
    cursor: pointer;
}

.app-shell {
    width: min(100% - 40px, var(--container));
    min-height: calc(100vh - 155px);
    margin: 0 auto;
    padding: 20px 0 38px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
}

.page-heading h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
}

.page-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text);
}

.section-title {
    margin: 0 0 15px;
    font-size: 19px;
    font-weight: 700;
}

.card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-body {
    padding: 20px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 17px;
    color: #fff;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease;
}

.btn:hover {
    color: #fff;
    background: var(--primary-dark);
}

.btn-outline {
    color: var(--primary-dark);
    background: #fff;
}

.btn-outline:hover {
    color: #fff;
    background: var(--primary);
}

.form-control {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    color: var(--text);
    background: #fff;
    border: 1px solid #ccd6df;
    border-radius: 5px;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23,162,184,.13);
}

.site-footer {
    color: #fff;
    background: var(--primary);
}

.footer-inner {
    width: min(100% - 40px, var(--container));
    min-height: 65px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    font-size: 13px;
    font-weight: 700;
}

.footer-inner small {
    color: rgba(255,255,255,.9);
    font-size: 12px;
    font-weight: 400;
}

/* Halaman beranda */
.welcome-banner {
    display: grid;
    grid-template-columns: 1.4fr .8fr;
    align-items: center;
    gap: 25px;
    padding: 30px;
    margin-bottom: 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.welcome-banner h2 {
    margin: 0 0 10px;
    font-size: clamp(23px, 3vw, 31px);
    line-height: 1.25;
}

.welcome-banner p {
    max-width: 680px;
    margin: 0 0 18px;
    color: var(--muted);
}

.welcome-art {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
}

.welcome-art i {
    font-size: 80px;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    min-height: 215px;
    padding: 23px;
    background: #fff;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    margin-bottom: 15px;
    color: var(--primary-dark);
    background: var(--primary-soft);
    border-radius: 7px;
    font-size: 21px;
}

.feature-card h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.feature-card p {
    flex: 1;
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.feature-link {
    color: var(--primary-dark);
    font-weight: 700;
}

.notice {
    margin-top: 22px;
    padding: 15px 18px;
    color: #5c5960;
    background: #fff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 5px;
    font-size: 13px;
}

@media (max-width: 1120px) {
    .navbar {
        width: min(100% - 28px, var(--container));
        gap: 12px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text small {
        max-width: 190px;
    }

    .nav-link {
        padding: 0 9px;
        font-size: 14px;
    }

    .nav-link i {
        font-size: 14px;
    }
}

@media (max-width: 850px) {
    .navbar {
        min-height: 68px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .brand-logo {
        width: 39px;
        height: 39px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .main-navigation {
        display: none;
        flex: 0 0 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 3px;
        min-height: auto;
        padding: 8px 0 4px;
    }

    .main-navigation.is-open {
        display: flex;
    }

    .nav-link {
        justify-content: flex-start;
        min-height: 44px;
        padding: 10px 13px;
        border-radius: 4px;
        font-size: 15px;
    }

    .nav-account {
        margin-left: 0;
    }

    .app-shell {
        width: min(100% - 28px, var(--container));
    }

    .welcome-banner {
        grid-template-columns: 1fr;
        padding: 23px;
    }

    .welcome-art {
        min-height: 120px;
    }

    .welcome-art i {
        font-size: 60px;
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .app-shell {
        padding-top: 17px;
    }

    .brand-text strong {
        font-size: 17px;
    }

    .brand-text small {
        max-width: 210px;
        font-size: 10px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .page-heading h1 {
        font-size: 19px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .feature-card {
        min-height: 190px;
        padding: 20px;
    }

    .card-body {
        padding: 16px;
    }

    .welcome-banner {
        padding: 20px;
    }

    .welcome-banner h2 {
        font-size: 24px;
    }

    .footer-inner {
        width: min(100% - 28px, var(--container));
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 16px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
    }
}

/* =========================================
   TAMBAHAN: HEADER TETAP DAN FOOTER
   MindCheck-SAN
   ========================================= */

/* Header tetap berada di atas saat halaman digulir */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Halaman minimal setinggi layar */
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Konten mengisi ruang di antara header dan footer */
.app-shell {
    flex: 1 0 auto;
    width: min(100% - 40px, 1510px);
    margin-right: auto;
    margin-left: auto;
}

/* Footer berada di bawah konten, tidak menutupi halaman */
.site-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
}

/* Penyesuaian layar HP */
@media (max-width: 850px) {
    .app-shell {
        width: calc(100% - 28px);
    }
}

/* Menghindari judul tertutup header ketika menuju bagian halaman */
[id] {
    scroll-margin-top: 95px;
}

/* Footer MindCheck-SAN */
.site-footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    color: #fff;
    background: #17a2b8;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-inner {
    width: min(100% - 40px, 1510px);
    min-height: 65px;
    margin: 0 auto;
    padding: 15px 0;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    font-size: 13px;
    font-weight: 700;
}

.footer-inner small {
    color: rgba(255, 255, 255, 0.95);
    font-size: 12px;
    font-weight: 400;
}

@media (max-width: 600px) {
    .footer-inner {
        width: calc(100% - 28px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 5px;
        padding: 14px 0;
    }
}

/* FIX FOOTER MINDCHECK-SAN */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Header tetap pada posisi atas */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

/* Area konten mengisi ruang kosong */
main.app-shell {
    flex: 1 0 auto;
    width: min( calc(100% - 40px), 1510px );
    margin-right: auto;
    margin-left: auto;
    padding-bottom: 38px;
}

/* Footer berada setelah konten */
footer.site-footer {
    position: relative;
    inset: auto;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    background: #17a2b8;
    color: #fff;
}

footer.site-footer .footer-inner {
    width: min(calc(100% - 40px), 1510px);
    min-height: 65px;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 600px) {
    main.app-shell {
        width: calc(100% - 28px);
    }

    footer.site-footer .footer-inner {
        width: calc(100% - 28px);
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ===== LAYOUT UTAMA MINDCHECK-SAN ===== */

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Header tetap di atas */
body > .site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    flex: 0 0 auto;
}

/* Konten mengisi ruang kosong */
body > main.app-shell {
    flex: 1 0 auto;
    width: min( calc(100% - 40px), 1510px );
    margin-right: auto;
    margin-left: auto;
}

/* Footer memenuhi lebar layar */
body > footer.site-footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    flex: 0 0 auto;
    color: #fff;
    background: #17a2b8;
}

/* Isi footer */
.site-footer .footer-inner {
    width: min(calc(100% - 40px), 1510px);
    min-height: 65px;
    margin: 0 auto;
    padding: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
    font-weight: 700;
}

.site-footer .footer-inner small {
    color: rgba(255,255,255,.95);
    font-size: 12px;
    font-weight: 400;
}

/* Tampilan HP */
@media (max-width: 600px) {
    body > main.app-shell {
        width: calc(100% - 28px);
    }

    .site-footer .footer-inner {
        width: calc(100% - 28px);
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* HEADER TETAP DI ATAS */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    flex-shrink: 0;
}

/* FOOTER TETAP DI BAWAH SAAT KONTEN PENDEK */
html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* KONTEN INDEX TIDAK DIUBAH UKURAN ATAU POSISINYA */
main.app-shell {
    flex: 1 0 auto;
}

/* FOOTER MENGISI LEBAR LAYAR */
footer.site-footer {
    position: relative;
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.site-footer .footer-inner {
    width: min(calc(100% - 40px), 1510px);
    min-height: 65px;
    margin: 0 auto;
    padding: 15px 0;
    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-footer .footer-inner small {
    font-size: 12px;
}

@media (max-width: 600px) {
    .site-footer .footer-inner {
        width: calc(100% - 28px);
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Tombol daftar akun santri */
.nav-link.nav-register {
    color: #087f8c;
    background: #e9f8fa;
    border: 1px solid #cceef1;
}

.nav-link.nav-register:hover,
.nav-link.nav-register.active {
    color: #ffffff;
    background: #087f8c;
    border-color: #087f8c;
}

/* Menu daftar pada tampilan mobile */
@media (max-width: 900px) {
    .nav-link.nav-register {
        margin-top: 2px;
    }
}

/* =====================================
   FORM LOGIN MINDCHECK-SAN
===================================== */

.login-form,
.feature-card form {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #244650;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d9e5e8;
    border-radius: 10px;
    outline: none;
    background: #fff;
    color: #243f48;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

.form-group input::placeholder {
    color: #9aaab0;
}

.form-group input:focus {
    border-color: #1599a6;
    box-shadow: 0 0 0 3px rgba(21, 153, 166, .12);
}

/* Tombol tampilkan kata sandi */
#toggle-password {
    margin-top: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #d9e5e8;
    border-radius: 9px;
    background: #f5fafb;
    color: #267580;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

#toggle-password:hover {
    background: #e8f5f6;
    border-color: #9bcdd2;
}

/* Tombol masuk */
.feature-card form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 10px;
    background: #138b99;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

.feature-card form button[type="submit"]:hover {
    background: #0d7582;
}

.feature-card form button[type="submit"]:active {
    transform: scale(.99);
}

/* Link pendaftaran */
.feature-card form + p {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid #edf1f3;
    color: #71828a;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.feature-card form + p a {
    display: inline-block;
    margin-left: 3px;
    color: #138b99;
    font-weight: 700;
    text-decoration: none;
}

.feature-card form + p a:hover {
    text-decoration: underline;
}

/* Pesan kesalahan */
.feature-card .notice[role="alert"] {
    margin-bottom: 20px;
    border-left: 4px solid #d9534f;
    background: #fff4f3;
    color: #8f3030;
}

.feature-card .notice[role="alert"] p {
    margin-bottom: 0;
}

/* Tampilan HP */
@media (max-width: 600px) {
    .form-group {
        margin-bottom: 17px;
    }

    .form-group input {
        min-height: 46px;
        font-size: 16px;
    }

    #toggle-password {
        min-height: 38px;
    }

    .feature-card form button[type="submit"] {
        min-height: 47px;
    }
}

/* Ringkas bagian privasi pada halaman login */
.feature-card:has(.fa-shield-heart) {
    align-self: start;
    padding: 20px;
}

.feature-card:has(.fa-shield-heart) .feature-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    font-size: 18px;
}

.feature-card:has(.fa-shield-heart) h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.feature-card:has(.fa-shield-heart) > p {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.6;
}

.feature-card:has(.fa-shield-heart) .notice {
    margin: 0;
    padding: 12px;
}

.feature-card:has(.fa-shield-heart) .notice strong {
    font-size: 12px;
}

.feature-card:has(.fa-shield-heart) .notice p {
    margin: 5px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .feature-card:has(.fa-shield-heart) {
        padding: 16px;
    }
}

/* ========================================
   MINCHECK-SAN - FORM PENDAFTARAN SANTRI
======================================== */

.feature-card form {
    width: 100%;
    margin-top: 24px;
}

.feature-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
    width: 100%;
}

.feature-card .form-group label {
    display: block;
    margin: 0;
    color: #173b32;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.feature-card .form-group input,
.feature-card .form-group textarea,
.feature-card .form-group select {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid #d7e2dc;
    border-radius: 10px;
    background: #fff;
    color: #24352e;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.feature-card .form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.feature-card .form-group input::placeholder,
.feature-card .form-group textarea::placeholder {
    color: #98a59e;
    opacity: 1;
}

.feature-card .form-group input:focus,
.feature-card .form-group textarea:focus,
.feature-card .form-group select:focus {
    border-color: #0b7655;
    box-shadow: 0 0 0 3px rgba(11, 118, 85, 0.12);
}

.feature-card .form-group small {
    display: block;
    margin-top: 3px;
    color: #64756c;
    font-size: 12px;
    line-height: 1.7;
}

.feature-card .form-group p {
    margin: 0;
}

/* Tombol tampilkan kata sandi */
#toggle-password {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    max-width: 100%;
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* Area tombol daftar */
.feature-card form > p {
    margin: 0;
}

.feature-card form button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 48px;
    padding: 13px 18px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card form button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(11, 93, 70, 0.16);
}

.feature-card form button[type="submit"]:focus-visible,
#toggle-password:focus-visible {
    outline: 3px solid rgba(11, 118, 85, 0.3);
    outline-offset: 3px;
}

/* Tautan masuk */
.feature-card > p {
    margin-top: 22px;
    color: #5c6b63;
    font-size: 13px;
    line-height: 1.8;
}

.feature-card > p a {
    color: #087653;
    font-weight: 700;
    text-decoration: none;
}

.feature-card > p a:hover {
    text-decoration: underline;
}

/* Kartu pendaftaran dan informasi */
.feature-grid {
    align-items: start;
}

.feature-card {
    min-width: 0;
    box-sizing: border-box;
}

.feature-card h3 {
    line-height: 1.5;
}

.feature-card .notice {
    margin-top: 18px;
}

/* Tampilan ponsel */
@media (max-width: 600px) {
    .feature-card {
        padding: 20px 16px;
    }

    .feature-card .form-group {
        margin-bottom: 17px;
    }

    .feature-card .form-group input,
    .feature-card .form-group textarea,
    .feature-card .form-group select {
        font-size: 16px;
    }

    #toggle-password {
        width: 100%;
    }

    .feature-card form button[type="submit"] {
        width: 100%;
    }
}
