﻿/* ============================================================
   xacminh_gcntn.css — Tra cứu Giấy CN Tốt Nghiệp (Public)
   ============================================================ */
@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-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;
}

body {
    font-family: var(--font);
}

/* ── Page wrapper ────────────────────────────────────────── */
.xm-page-wrap {
    background: var(--n50);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ── Hero banner ─────────────────────────────────────────── */
.xm-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: 56px 0 120px;
    color: var(--white);
    position: relative;
    overflow: hidden;
    text-align: center;
}

    .xm-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;
    }

    .xm-hero::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 60px;
        background: var(--n50);
        clip-path: ellipse(55% 100% at 50% 100%);
    }

.xm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    color: rgba(255,255,255,.88);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 50px;
    margin-bottom: 20px;
}

.xm-hero-title {
    font-family: var(--font-d);
    font-size: clamp(22px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.xm-hero-sub {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255,255,255,.62);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ── Search card nổi lên ─────────────────────────────────── */
.search-card {
    position: relative;
    background: var(--white);
    padding: 40px 44px;
    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 */
.watermark {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

    .watermark img {
        width: 38%;
        max-width: 300px;
        min-width: 180px;
        height: auto;
        opacity: .07;
    }
/* Đảm bảo nội dung nổi trên watermark */
.search-card > *:not(.watermark) {
    position: relative;
    z-index: 1;
}

/* ── Label ───────────────────────────────────────────────── */
.search-card label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--n500);
    margin-bottom: 6px;
    display: block;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ── Input mã ────────────────────────────────────────────── */
.xm-input-icon-wrap {
    position: relative;
}

    .xm-input-icon-wrap .input-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--n300);
        font-size: 14px;
        pointer-events: none;
    }

.modern-input {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--n200);
    border-radius: var(--r-sm);
    padding: 0 16px 0 42px;
    font-size: 15px;
    font-family: var(--font);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--n900);
    background: var(--n50);
    transition: var(--t);
    outline: none;
}

    .modern-input::placeholder {
        color: var(--n300);
        font-weight: 300;
        letter-spacing: .02em;
    }

    .modern-input:focus {
        border-color: var(--blue-500);
        background: var(--white);
        box-shadow: 0 0 0 4px rgba(59,125,216,.14);
    }

    .modern-input.gold-fill {
        border-color: var(--gold);
        background: var(--gold-light);
        box-shadow: 0 0 0 4px rgba(201,168,76,.14);
    }

    .modern-input.input-error {
        border-color: #ef4444;
        background: #fff5f5;
        box-shadow: 0 0 0 4px rgba(239,68,68,.12);
    }

/* ── Auto-fill badge ─────────────────────────────────────── */
.xm-autofill-note {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--gold-light);
    border: 1px solid rgba(201,168,76,.4);
    border-radius: var(--r-sm);
    padding: 9px 14px;
    font-size: 12.5px;
    color: #78580a;
    margin-bottom: 14px;
    animation: xmSlide .3s ease;
}

    .xm-autofill-note.show {
        display: flex;
    }

@keyframes xmSlide {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Captcha box ─────────────────────────────────────────── */
.captcha-box {
    margin-top: 6px;
}

/* ── Nút hành động — căn giữa đều ───────────────────────── */
.xm-btn-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.search-btn {
    height: 48px;
    padding: 0 36px;
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 100%);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 4px 16px rgba(37,99,176,.35);
    transition: var(--t);
}

    .search-btn:hover {
        background: linear-gradient(135deg, var(--blue-800) 0%, var(--blue-600) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(37,99,176,.45);
        color: var(--white);
    }

    .search-btn:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none !important;
    }

.search-QR {
    height: 48px;
    padding: 0 28px;
    background: var(--white);
    color: var(--blue-700);
    border: 1.5px solid var(--n200);
    border-radius: 50px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--t);
}

    .search-QR:hover {
        background: var(--blue-50);
        border-color: var(--blue-400);
        color: var(--blue-700);
        transform: translateY(-2px);
        box-shadow: var(--sh-md);
    }

/* ── Info box hướng dẫn ──────────────────────────────────── */
.search-footer-info {
    margin-top: 28px;
}

    .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;
    }

/* ── Certificate card kết quả ────────────────────────────── */
.certificate-card {
    background: var(--white);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--sh-lg);
    border: 1px solid var(--n200);
    animation: fadeUp .35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-header-custom {
    background: linear-gradient(160deg, var(--blue-900), var(--blue-700));
    text-align: center;
    padding: 32px 28px 26px;
    position: relative;
}

    .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: 64px;
    margin-bottom: 14px;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.main-title {
    font-family: var(--font-d);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--white);
    letter-spacing: .5px;
}

/* Badge hiệu lực */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #dcfce7;
    color: #16a34a;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12.5px;
}

.badge-soon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fef3c7;
    color: #78350f;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12.5px;
}

.badge-expired {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fee2e2;
    color: #7f1d1d;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 12.5px;
}

/* Info grid 2 cột */
.card-body-custom {
    padding: 0;
}

.info-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.info-group {
    padding: 13px 22px;
    border-bottom: 1px solid var(--n100);
    border-right: 1px solid var(--n100);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.info-grid-2 .info-group:nth-child(even) {
    border-right: none;
}

.info-grid-2 .info-group.full {
    grid-column: 1 / -1;
    border-right: none;
}

.info-group:last-child,
.info-grid-2 .info-group:nth-last-child(-n+2) {
    border-bottom: none;
}

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--n500);
    letter-spacing: .7px;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: 8px;
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--n900);
    text-align: right;
}

    .info-value.code-mono {
        font-family: 'Courier New', monospace;
        font-size: 15px;
        letter-spacing: .1em;
        color: var(--blue-800);
    }

/* Action buttons — căn giữa */
.cert-actions {
    padding: 18px 24px;
    background: var(--n50);
    border-top: 1px solid var(--n100);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 28px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
    color: var(--white) !important;
    border: none;
    border-radius: 50px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(37,99,176,.3);
    text-decoration: none;
    cursor: pointer;
    transition: var(--t);
}

    .btn-retry:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 22px rgba(37,99,176,.4);
        color: var(--white) !important;
    }

.btn-contact-support {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 24px;
    background: var(--white);
    color: var(--n700) !important;
    border: 1.5px solid var(--n200);
    border-radius: 50px;
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--t);
}

    .btn-contact-support:hover {
        background: var(--blue-50);
        border-color: var(--blue-400);
        color: var(--blue-700) !important;
        transform: translateY(-2px);
    }

/* ── Steps hướng dẫn ─────────────────────────────────────── */
.steps-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 28px;
}

.step-item {
    background: var(--white);
    border: 1px solid var(--n200);
    border-radius: var(--r-md);
    padding: 18px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--t);
}

    .step-item:hover {
        box-shadow: var(--sh-md);
        transform: translateY(-2px);
    }

.step-num {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--blue-600), var(--blue-500));
    color: var(--white);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-text {
    font-size: 13px;
    color: var(--n500);
    line-height: 1.65;
}

    .step-text strong {
        color: var(--n900);
        font-weight: 600;
    }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .search-card {
        padding: 28px 20px;
        margin-top: -52px;
    }

    .xm-hero {
        padding: 44px 0 100px;
    }

    .xm-btn-row {
        flex-direction: column;
        align-items: stretch;
    }

    .search-btn, .search-QR {
        width: 100%;
        justify-content: center;
    }

    .info-grid-2 {
        grid-template-columns: 1fr;
    }

        .info-grid-2 .info-group {
            border-right: none;
        }

            .info-grid-2 .info-group.full {
                grid-column: 1;
            }

            .info-grid-2 .info-group:nth-last-child(-n+2) {
                border-bottom: 1px solid var(--n100);
            }

            .info-grid-2 .info-group:last-child {
                border-bottom: none;
            }

    .cert-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-retry, .btn-contact-support {
        justify-content: center;
        width: 100%;
    }

    .steps-wrap {
        grid-template-columns: 1fr;
    }

    .card-header-custom {
        padding: 24px 18px 20px;
    }
}
