/* ==========================================================================
   DESAIN PORTAL PUBLIK RAPOR - YAYASAN ROUDLOTUL QUR'AN AZ ZUHRI
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --primary-color: #157A42;
    --primary-dark: #0C4325;
    --primary-light: #1E8E4F;
    --accent-gold: #D99B26;
    --accent-gold-hover: #C4891C;
    --bg-body: #EDF7F0;
    --bg-card: #FFFFFF;
    --text-main: #143523;
    --text-muted: #456251;
    --line: #D0E7D7;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background-color: var(--bg-body);
    margin: 0;
    padding: 0;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 38px 20px 32px;
    box-shadow: 0 4px 18px rgba(12, 67, 37, 0.15);
    position: relative;
}

.header-brand {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    gap: 14px;
    text-align: left;
}

.header-logo {
    display: block;
    width: 84px;
    height: 84px;
    max-width: 84px;
    max-height: 84px;
    flex: 0 0 84px;
    object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.16));
}

.header h1 {
    margin: 0;
    font-size: 26px;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.header p {
    margin: 8px 0 0 0;
    font-size: 14.5px;
    color: #D1FAE5;
    font-weight: 500;
}

.header-nav {
    position: absolute;
    top: 20px;
    right: 20px;
}

.header-nav a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.16);
    padding: 7px 16px;
    border-radius: 999px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-nav a:hover {
    background: #FFFFFF;
    color: var(--primary-dark);
}

.container {
    max-width: 680px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.search-box {
    background: white;
    padding: 35px 30px;
    border-radius: 18px;
    box-shadow: 0 4px 20px rgba(18, 99, 54, 0.05);
    text-align: center;
    border: 1px solid var(--line);
    border-top: 5px solid var(--primary-color);
}

.search-box h2 {
    margin-top: 0;
    color: var(--primary-dark);
    font-size: 22px;
    font-weight: 800;
}

.search-box p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.search-box input {
    width: 100%;
    max-width: 480px;
    padding: 13px 18px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 122, 66, 0.15);
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 36px;
    font-size: 15px;
    font-family: inherit;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(21, 122, 66, 0.25);
    transition: background-color 0.2s, transform 0.1s;
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

.search-box button:active {
    transform: scale(0.98);
}

.result-card {
    background: white;
    margin-top: 25px;
    padding: 25px 30px;
    border-radius: 16px;
    border: 1px solid var(--line);
    border-left: 6px solid var(--accent-gold);
    box-shadow: 0 4px 18px rgba(18, 99, 54, 0.05);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-card h3 {
    margin-top: 0;
    color: var(--primary-color);
    border-bottom: 1px solid #E2F2E7;
    padding-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-info p {
    margin: 10px 0;
    font-size: 14.5px;
    color: var(--text-main);
}

.student-info strong {
    color: var(--primary-dark);
    display: inline-block;
    width: 140px;
}

.download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    background-color: var(--accent-gold);
    color: #FFFFFF;
    text-decoration: none;
    padding: 13px;
    margin-top: 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14.5px;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(217, 155, 38, 0.25);
}

.download-btn:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-1px);
}

.alert-box {
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    font-size: 14px;
}

.alert-notfound {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.footer {
    text-align: center;
    padding: 28px 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: auto;
    border-top: 1px solid var(--line);
    background: white;
}

.footer p {
    margin: 4px 0;
}

.footer-credit {
    margin-top: 0 !important;
    white-space: nowrap;
    font-size: 11px;
}

@media (max-width: 600px) {
    .header {
        padding: 30px 16px 24px;
    }

    .header-brand {
        gap: 11px;
    }

    .header-logo {
        width: 64px;
        height: 64px;
        max-width: 64px;
        max-height: 64px;
        flex-basis: 64px;
    }

    .header h1 {
        font-size: 19px;
    }

    .header p {
        font-size: 11px;
        margin-top: 5px;
    }
}
