:root {
    --page-bg: #eef4f3;
    --ink: #16202a;
    --muted: #657382;
    --line: #d6e2de;
    --brand: #08785f;
    --brand-dark: #064936;
    --accent: #dfaa35;
    --soft: #f7faf9;
    --panel: #ffffff;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(223, 170, 53, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(8, 120, 95, 0.13), rgba(20, 38, 78, 0.08)),
        var(--page-bg);
    font-family: "Segoe UI", Arial, sans-serif;
}

.topbar {
    background: var(--brand-dark);
    border-bottom: 4px solid var(--accent);
    box-shadow: 0 10px 24px rgba(7, 86, 66, 0.18);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 0;
}

.verification-shell {
    width: min(680px, calc(100% - 24px));
    margin: 30px auto 10px;
}

.verification-card {
    position: relative;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(22, 32, 42, 0.16);
}

.verification-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    content: "";
    background: linear-gradient(90deg, var(--accent), var(--brand), #2f5da8);
}

.verification-header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px 9px;
    color: #ffffff;
    background:
        linear-gradient(125deg, rgba(6, 73, 54, 0.97), rgba(8, 120, 95, 0.94)),
        var(--brand-dark);
}

.verification-title {
    margin: 0;
    font-size: 1.28rem;
    font-weight: 750;
    line-height: 1.2;
}

.print-button {
    flex: 0 0 auto;
    padding: 8px 13px;
    color: #123326;
    background: var(--accent);
    border: 0;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.print-button:hover {
    background: #f2bd49;
}

.student-summary {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 96px;
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 249, 0.98)),
        var(--soft);
    border-bottom: 1px solid var(--line);
}

.photo-panel {
    text-align: left;
}

.student-photo {
    width: 118px;
    height: 142px;
    object-fit: cover;
    background: #eef4f3;
    border: 6px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 12px 26px rgba(22, 32, 42, 0.17);
}

.photo-placeholder {
    display: grid;
    place-items: center;
    width: 118px;
    height: 142px;
    color: var(--muted);
    background: #eef4f3;
    border: 1px dashed #b7c6c1;
    border-radius: 8px;
    font-weight: 700;
}

.student-heading {
    min-width: 0;
}

.student-name {
    margin: 0 0 6px;
    color: var(--brand-dark);
    font-size: 1.48rem;
    font-weight: 750;
    line-height: 1.25;
}

.reg-block {
    margin-top: 10px;
}

.reg-line,
.session-line {
    color: var(--muted);
    font-weight: 700;
}

.reg-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    font-size: 0.94rem;
}

.reg-number {
    color: #0d6049;
    font-size: 1.30rem;
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.session-line {
    margin-top: 5px;
    font-size: 0.92rem;
}

.verified-seal {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    color: var(--brand-dark);
    background: #fff8e6;
    border: 3px solid var(--accent);
    border-radius: 50%;
    box-shadow:
        0 0 0 5px rgba(223, 170, 53, 0.16),
        0 12px 26px rgba(22, 32, 42, 0.12);
    font-size: 0.73rem;
    font-weight: 800;
    line-height: 1.08;
    text-align: center;
    text-transform: uppercase;
}

.verified-seal span {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.details-box {
    padding: 10px 24px 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f1;
}

.detail-row:last-child {
    border-bottom: 0;
}

.detail-label {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.detail-value {
    color: var(--ink);
    font-size: 0.9rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.alert-panel {
    padding: 44px 28px;
    text-align: center;
}

.alert-panel h1 {
    margin-bottom: 10px;
    color: var(--brand-dark);
    font-size: 1.6rem;
    font-weight: 750;
}

.alert-panel p {
    margin: 0;
    color: var(--muted);
}

.page-footer {
    width: min(680px, calc(100% - 24px));
    margin: 0 auto 28px;
    color: var(--muted);
    font-size: 0.92rem;
    text-align: center;
}

.page-footer a {
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .verification-shell {
        margin-top: 58px;
    }

    .verification-header,
    .student-summary {
        padding: 12px 18px;
    }

    .verification-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-summary {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .photo-panel {
        text-align: center;
    }

    .verified-seal {
        width: 78px;
        height: 78px;
    }

    .details-box {
        padding: 10px 18px 18px;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 3px;
        text-align: left;
    }
}

@media print {
    @page {
        size: A4;
        margin: 10mm;
    }

    html,
    body {
        width: 190mm;
        min-height: auto;
        background: #ffffff;
    }

    .topbar,
    .print-button,
    .page-footer {
        display: none !important;
    }

    .verification-shell {
        width: 100%;
        margin: 0;
    }

    .verification-card {
        width: 100%;
        border: 1px solid #b8c7c2;
        box-shadow: none;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .verification-header {
        padding: 12px 16px;
    }

    .student-summary {
        grid-template-columns: 110px minmax(0, 1fr) 78px;
        gap: 12px;
        padding: 14px 16px;
    }

    .student-photo,
    .photo-placeholder {
        width: 98px;
        height: 118px;
        border-width: 4px;
    }

    .student-name {
        font-size: 1.2rem;
    }

    .reg-number {
        font-size: 1.16rem;
    }

    .verified-seal {
        width: 70px;
        height: 70px;
        font-size: 0.62rem;
        box-shadow: none;
    }

    .verified-seal span {
        font-size: 1.05rem;
    }

    .details-box {
        padding: 8px 16px 12px;
    }

    .detail-row {
        grid-template-columns: 142px minmax(0, 1fr);
        gap: 10px;
        padding: 5px 0;
    }

    .detail-label,
    .detail-value {
        font-size: 0.78rem;
    }
}
