﻿/* ============================================================
   CỔNG TRA CỨU VĂN BẰNG – NTTU  |  verify.css (Redesign 2026)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');

:root {
    --blue-900: #0d2f5e;
    --blue-800: #1a4080;
    --blue-700: #1f5099;
    --blue-600: #2563b0;
    --blue-500: #3b7dd8;
    --blue-400: #60a0e8;
    --blue-100: #dbeafe;
    --blue-50: #eff6ff;
    --gold: #c9a84c;
    --gold-light: #f5e6c0;
    --n900: #0f172a;
    --n700: #334155;
    --n500: #64748b;
    --n300: #cbd5e1;
    --n200: #e2e8f0;
    --n100: #f1f5f9;
    --n50: #f8fafc;
    --white: #ffffff;
    --sh-sm: 0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
    --sh-md: 0 4px 16px rgba(0,0,0,.08),0 2px 4px rgba(0,0,0,.05);
    --sh-lg: 0 20px 50px rgba(0,0,0,.10),0 8px 16px rgba(0,0,0,.06);
    --sh-xl: 0 32px 80px rgba(13,47,94,.18);
    --r-sm: 8px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --t: all .25s cubic-bezier(.4,0,.2,1);
    --font: 'Be Vietnam Pro',sans-serif;
    --font-d: 'Playfair Display',serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

body {
    font-family: var(--font);
    background: var(--n50);
    color: var(--n900);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6
}

/* HEADER */
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--n200);
    padding: 12px 0;
    box-shadow: 0 2px 12px rgba(13,47,94,.07);
    position: sticky;
    top: 0;
    z-index: 1000
}

.header-container {
    display: flex;
    align-items: center
}

.header-left {
    display: flex;
    align-items: center;
    gap: 14px
}

.logo {
    height: 52px;
    width: auto;
    transition: var(--t)
}

    .logo:hover {
        transform: scale(1.03)
    }

.university-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--blue-800);
    line-height: 1.3;
    letter-spacing: -.2px
}

.portal-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--blue-500);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-top: 2px
}

.header-right {
    margin-left: auto
}

.header-right-toggle {
    display: flex;
    align-items: center;
    background: var(--n100);
    border: 1px solid var(--n200);
    padding: 4px;
    border-radius: 50px;
    gap: 2px
}

.btn-verify-fancy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--t);
    cursor: pointer;
    border: none;
    background: linear-gradient(135deg,var(--blue-600),var(--blue-500));
    color: var(--white);
    box-shadow: 0 2px 10px rgba(37,99,176,.3);
    white-space: nowrap
}

    .btn-verify-fancy:hover {
        background: linear-gradient(135deg,var(--blue-800),var(--blue-600));
        color: var(--white);
        box-shadow: 0 4px 18px rgba(37,99,176,.45);
        transform: translateY(-1px)
    }

    .btn-verify-fancy .icon-wrap {
        width: 24px;
        height: 24px;
        background: rgba(255,255,255,.22);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 11px
    }

.btn-auth-custom {
    background: transparent !important;
    color: var(--n700) !important;
    box-shadow: none !important
}

    .btn-auth-custom .icon-wrap {
        background: rgba(0,0,0,.06) !important;
        color: var(--n700) !important
    }

    .btn-auth-custom:hover {
        background: rgba(37,99,176,.1) !important;
        color: var(--blue-700) !important;
        transform: none !important;
        box-shadow: none !important
    }

.dropdown-menu {
    border: 1px solid var(--n200) !important;
    border-radius: var(--r-md) !important;
    box-shadow: var(--sh-lg) !important;
    padding: 8px !important;
    min-width: 220px
}

.dropdown-item {
    border-radius: var(--r-sm) !important;
    font-size: 13.5px;
    font-weight: 500;
    padding: 10px 14px !important;
    transition: var(--t)
}

    .dropdown-item:hover {
        background: var(--blue-50) !important;
        color: var(--blue-700) !important
    }

/* HERO */
.hero {
    background: radial-gradient(ellipse 80% 60% at 50% -10%,rgba(59,125,216,.35) 0%,transparent 70%),linear-gradient(160deg,var(--blue-900) 0%,var(--blue-700) 55%,var(--blue-500) 100%);
    padding: 72px 0 120px;
    color: var(--white);
    position: relative;
    overflow: hidden
}

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at 80% 20%,rgba(255,255,255,.06) 1px,transparent 1px),radial-gradient(circle at 20% 80%,rgba(255,255,255,.04) 1px,transparent 1px);
        background-size: 60px 60px,80px 80px;
        pointer-events: none
    }

    .hero::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--n50);
        clip-path: ellipse(55% 100% at 50% 100%)
    }

.hero-title {
    font-family: var(--font-d);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: .5px;
    line-height: 1.25;
    text-shadow: 0 2px 20px rgba(0,0,0,.2);
    position: relative;
    z-index: 1
}

/* SEARCH CARD */
.search-card {
    position: relative;
    background: var(--white);
    padding: 44px 48px;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    margin-top: -72px;
    border: 1px solid rgba(37,99,176,.08);
    z-index: 2;
    overflow: hidden
}

.watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ép nó nằm ở lớp sâu nhất bên trong card */
    z-index: -1;
    pointer-events: none;
    user-select: none;
}

    .watermark img {
        width: 40%;
        max-width: 320px;
        min-width: 200px;
        height: auto;
        /* Nếu 0.05 quá mờ không thấy, hãy tăng lên 0.1 để test trước */
        opacity: .1;
    }

/* Quan trọng: Mọi nội dung khác bên trong card phải có z-index cao hơn */
.card-header-custom,
.card-body-custom,
.section-block {
    position: relative;
    z-index: 2;
}

.tab-content, .search-tabs, .search-footer-info, .nav-pills {
    position: relative;
    z-index: 2
}

/* SEARCH TABS */
.search-tabs {
    display: flex !important; /* Đổi từ inline-flex sang flex */
    justify-content: center; /* Căn giữa các tab bên trong */
    background: var(--n100);
    border-radius: 50px;
    padding: 5px;
    width: fit-content; /* Giúp nền bo cong chỉ ôm vừa nội dung */
    margin: 0 auto 32px !important; /* Căn giữa toàn bộ khối */
}

    .search-tabs .nav-link {
        border-radius: 50px;
        padding: 11px 28px;
        font-weight: 600;
        font-size: 14px;
        color: var(--n500);
        background: transparent;
        border: none;
        transition: var(--t);
        display: flex;
        align-items: center;
        gap: 8px;
        white-space: nowrap
    }

        .search-tabs .nav-link:hover {
            color: var(--blue-700);
            background: rgba(37,99,176,.08)
        }

        .search-tabs .nav-link.active {
            background: var(--white);
            color: var(--blue-700);
            box-shadow: var(--sh-md);
            font-weight: 700
        }

        .search-tabs .nav-link img {
            width: 20px;
            height: 20px;
            opacity: .7;
            transition: var(--t)
        }

        .search-tabs .nav-link.active img {
            opacity: 1
        }

/* FORM */
label {
    font-size: 12px;
    font-weight: 700;
    color: var(--n500);
    margin-bottom: 6px;
    display: block;
    letter-spacing: .4px;
    text-transform: uppercase
}

.modern-input {
    border-radius: var(--r-sm);
    border: 1.5px solid var(--n200);
    height: 46px;
    padding: 10px 14px;
    font-size: 14.5px;
    font-family: var(--font);
    color: var(--n900);
    background: var(--n50);
    transition: var(--t);
    width: 100%
}

    .modern-input::placeholder {
        color: var(--n300)
    }

    .modern-input:focus {
        border-color: var(--blue-500);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(59,125,216,.15);
        outline: none
    }

    .modern-input.input-error {
        border-color: #ef4444;
        background: #fff5f5;
        box-shadow: 0 0 0 4px rgba(239,68,68,.12)
    }

.captcha-box {
    margin-top: 6px
}

/* BUTTONS */
.search-btn {
    background: linear-gradient(135deg,var(--blue-600) 0%,var(--blue-500) 100%);
    border: none;
    color: var(--white);
    padding: 13px 34px;
    font-weight: 700;
    font-size: 14px;
    font-family: var(--font);
    border-radius: 50px;
    transition: var(--t);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(37,99,176,.35);
    letter-spacing: .3px
}

    .search-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(37,99,176,.45);
        background: linear-gradient(135deg,var(--blue-800) 0%,var(--blue-600) 100%);
        color: var(--white)
    }

.search-QR {
    background: var(--white);
    border: 1.5px solid var(--n200);
    color: var(--blue-700);
    padding: 13px 26px;
    font-weight: 600;
    font-size: 14px;
    font-family: var(--font);
    border-radius: 50px;
    transition: var(--t);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 10px
}

    .search-QR:hover {
        background: var(--blue-50);
        border-color: var(--blue-400);
        transform: translateY(-2px);
        box-shadow: var(--sh-md);
        color: var(--blue-700)
    }

/* INFO BOX */
.search-footer-info {
    margin-top: 32px
}

    .search-footer-info .d-flex {
        background: linear-gradient(135deg,var(--blue-50) 0%,#f0f7ff 100%) !important;
        border: 1px solid var(--blue-100) !important;
        border-radius: var(--r-md) !important;
        border-left: 4px solid var(--blue-500) !important
    }

/* FOOTER */
.main-footer {
    background: linear-gradient(160deg,var(--blue-900) 0%,var(--blue-800) 100%);
    color: rgba(255,255,255,.9);
    margin-top: 80px;
    padding: 56px 0 28px;
    position: relative;
    overflow: hidden
}

    .main-footer::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg,var(--gold),var(--blue-400),var(--gold))
    }

.footer-col {
    padding-bottom: 20px
}

    .footer-col p {
        font-size: 13.5px;
        line-height: 1.8;
        color: rgba(255,255,255,.75);
        margin-bottom: 6px
    }

.footer-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px
}

    .footer-title i {
        font-size: 12px;
        background: rgba(201,168,76,.2);
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center
    }

.footer-row {
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding-bottom: 24px;
    margin-bottom: 16px
}

.footer-bottom {
    text-align: center;
    font-size: 12.5px;
    color: rgba(255,255,255,.5);
    letter-spacing: .3px
}

/* LOADER */
#formLoader {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(6px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-700)
}

/* ERROR PAGE */
.result-card {
    background: var(--white);
    padding: 64px 40px;
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    margin-top: -60px;
    text-align: center;
    border: 1px solid var(--n200)
}

.error-title {
    font-family: var(--font-d);
    font-weight: 700;
    color: var(--n900);
    font-size: 1.8rem;
    margin-bottom: 10px
}

.error-subtitle {
    color: var(--n500);
    max-width: 480px;
    margin: 0 auto 28px
}

.search-summary {
    background: var(--n50);
    padding: 20px 24px;
    border-radius: var(--r-md);
    max-width: 420px;
    border-left: 4px solid var(--blue-400);
    margin: 0 auto 32px;
    text-align: left
}

    .search-summary li {
        display: flex;
        justify-content: space-between;
        padding: 6px 0;
        font-size: 13.5px;
        border-bottom: 1px dashed var(--n200)
    }

        .search-summary li:last-child {
            border-bottom: none
        }

.btn-retry {
    background: linear-gradient(135deg,var(--blue-600),var(--blue-800));
    color: var(--white) !important;
    padding: 13px 34px;
    border-radius: 50px;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 16px rgba(37,99,176,.3);
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none
}

    .btn-retry:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(37,99,176,.4);
        color: var(--white) !important
    }

.btn-contact-support {
    background: var(--white);
    color: var(--n700) !important;
    border: 1.5px solid var(--n200);
    padding: 13px 28px;
    border-radius: 50px;
    font-weight: 600;
    margin-left: 10px;
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none
}

    .btn-contact-support:hover {
        background: var(--n50);
        border-color: var(--n300);
        color: var(--n900) !important
    }

/* CERTIFICATE CARD (kết quả) */
.certificate-wrapper {
    max-width: 860px;
    margin: 30px auto;
    padding: 0 16px 60px
}

.certificate-card {
    background: var(--white);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--sh-xl);
    border: 1px solid var(--n200);
    position: relative;
    /* Đảm bảo card tạo ra một stacking context mới */
    z-index: 1;
}

.card-header-custom {
    background: linear-gradient(160deg,var(--blue-900),var(--blue-700));
    text-align: center;
    padding: 40px 30px 30px;
    position: relative;
    z-index: 2
}

    .card-header-custom::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg,transparent,var(--gold),transparent)
    }

.logo-img {
    max-height: 72px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: .95
}

.main-title {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white);
    letter-spacing: .5px
}

.card-body-custom {
    padding: 40px;
    position: relative;
    z-index: 2
}

.info-group {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 12px 0;
    border-bottom: 1px solid var(--n100)
}

    .info-group:last-child {
        border-bottom: none
    }

.info-label {
    font-size: 11px;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--n500);
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 16px
}

.info-value {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--n900);
    text-align: right
}

.text-primary {
    color: var(--blue-600) !important
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #16a34a;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12.5px;
    letter-spacing: .3px
}

.student-avatar {
    width: 110px;
    height: 140px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--blue-100);
    box-shadow: var(--sh-md)
}

    .student-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover
    }

/* HISTORY TABLE */
.card-master {
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--sh-lg);
    border: 1px solid var(--n200)
}

.icon-title {
    background: var(--blue-50);
    color: var(--blue-600);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    font-size: 14px
}

.table-history-fancy thead th {
    background: var(--n50);
    color: var(--n500);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-top: none;
    padding: 16px 18px;
    border-bottom: 2px solid var(--n200)
}

.table-history-fancy tbody tr {
    transition: var(--t);
    border-bottom: 1px solid var(--n100)
}

    .table-history-fancy tbody tr:hover {
        background: var(--blue-50) !important
    }

.table-history-fancy td {
    padding: 16px 18px;
    color: var(--n700);
    font-size: 14px;
    vertical-align: middle
}

.status-pill {
    padding: 5px 14px;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .3px;
    border-radius: 50px
}

.btn-action-detail {
    background: var(--white);
    border: 1.5px solid var(--n200);
    color: var(--blue-600);
    border-radius: var(--r-sm);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--t);
    display: inline-flex;
    align-items: center;
    gap: 6px
}

    .btn-action-detail:hover {
        background: var(--blue-600);
        color: var(--white);
        border-color: var(--blue-600);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(37,99,176,.3)
    }

/* VERIFY REQUEST */
.request-container {
    background: var(--n50);
    min-height: 50vh
}

.request-card {
    background: var(--white);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-xl);
    overflow: hidden;
    border: 1px solid var(--n200);
    margin-top: -90px
}

.request-header {
    background: linear-gradient(135deg,var(--blue-900),var(--blue-700));
    position: relative;
    overflow: hidden
}

    .request-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 2px;
        background: linear-gradient(90deg,transparent,var(--gold),transparent)
    }

.icon-box {
    background: rgba(255,255,255,.18);
    padding: 14px;
    border-radius: var(--r-sm);
    backdrop-filter: blur(4px)
}

.badge.bg-primary {
    background: linear-gradient(135deg,var(--blue-600),var(--blue-500)) !important;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(37,99,176,.35)
}

.upload-zone {
    background: var(--n50);
    border: 2px dashed var(--n300);
    border-radius: var(--r-md);
    transition: var(--t);
    cursor: pointer
}

    .upload-zone:hover {
        border-color: var(--blue-500);
        background: var(--blue-50)
    }

/* RESPONSIVE */
@media(max-width:768px) {
    .hero {
        padding: 52px 0 100px
    }

    .hero-title {
        font-size: 1.4rem
    }

    .search-card {
        padding: 28px 20px;
        margin-top: -50px
    }

    .search-btn, .search-QR {
        width: 100%;
        margin: 6px 0 !important
    }

    .search-tabs {
        width: 100% !important;
        justify-content: stretch
    }

        .search-tabs .nav-link {
            flex: 1;
            justify-content: center;
            padding: 10px 12px;
            font-size: 13px
        }

    .result-card {
        padding: 40px 20px;
        margin: -40px 10px 0
    }

    .btn-retry, .btn-contact-support {
        width: 100%;
        margin: 5px 0;
        justify-content: center
    }
}

@media(max-width:767.98px) {
    .header-right-toggle {
        gap: 4px !important;
        padding: 3px
    }

        .header-right-toggle .btn-verify-fancy {
            padding: 0 !important;
            width: 36px;
            height: 36px;
            justify-content: center;
            border-radius: 50% !important;
            min-width: 36px
        }

        .header-right-toggle .icon-wrap {
            margin: 0 !important;
            width: 100%;
            height: 100%;
            background: transparent !important
        }

        .header-right-toggle .btn-auth-custom {
            border: 1px solid var(--n200) !important;
            background: var(--white) !important
        }

        .header-right-toggle .dropdown-toggle::after {
            display: none !important
        }

        .header-right-toggle .dropdown {
            display: flex;
            align-items: center
        }

        .header-right-toggle .dropdown-toggle {
            padding: 0 !important;
            width: 36px !important;
            height: 36px !important;
            border-radius: 50% !important;
            justify-content: center !important
        }
}
