/* ── Layout ─────────────────────────────────────────── */
body { display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; position: relative;}

.site-header {
    height: 64px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(2px);
    background: #1e1e1e5c;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    text-decoration: none;
}
.header-logo {
    width: 40px; height: 40px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 1.15rem;
    flex-shrink: 0;
}
.logo-img{
    width: 180px;
    height: auto;
}
.brand-title { font-weight: 800; font-size: .95rem; color: var(--text); line-height: 1.2; }
.brand-sub   { font-size: .7rem; color: var(--text-muted); }

.site-main {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1rem 2rem;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--text-muted);
    gap: 1rem;
    flex-wrap: wrap;
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold); }

/* ── Search State ───────────────────────────────────── */
.search-wrap {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.search-hero { text-align: center; }

.hero-icon {
    width: 72px; height: 72px;
    background: rgba(255,138,3,.12);
    border: 2px solid rgba(255,138,3,.3);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0 auto 1.25rem;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: .5rem;
}
.hero-sub {
    font-size: .95rem;
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.6;
}

.search-card {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}
.search-input-wrap:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255,138,3,.12);
}
.search-icon {
    padding: 0 .85rem;
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}
.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 1rem;
    padding: 8px 0;
    font-family: inherit;
    min-width: 0;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
    background: var(--gold);
    color: #000;
    font-weight: 700;
    font-size: .88rem;
    border: none;
    padding: .75rem 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .4rem;
    transition: background .15s;
    flex-shrink: 0;
    height: 100%;
}
.search-btn:hover:not(:disabled) { background: var(--gold-dim); }
.search-btn:disabled { opacity: .6; cursor: not-allowed; }

.search-error {
    margin-top: .85rem;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.25);
    border-radius: 8px;
    color: #f87171;
    font-size: .83rem;
    padding: .6rem .9rem;
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}
.search-error::before {
    content: '\F33A';
    font-family: 'bootstrap-icons';
    flex-shrink: 0;
    margin-top: .05rem;
}

.search-hints {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.hint-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .8rem;
    color: var(--text-muted);
}
.hint-item i { color: var(--gold); }

/* ── State Pages (not found / invalid) ──────────────── */
.state-wrap {
    text-align: center;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.state-icon {
    width: 80px; height: 80px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin-bottom: .5rem;
}
.state-icon.err {
    background: rgba(239,68,68,.12);
    color: #f87171;
    border: 2px solid rgba(239,68,68,.25);
}
.state-title { font-size: 1.5rem; font-weight: 800; margin: 0; }
.state-body  { color: var(--text-muted); font-size: .92rem; line-height: 1.65; margin: 0; }
.state-contact { font-size: .8rem; color: var(--text-muted); margin: .5rem 0 0; }

/* ── Certificate ─────────────────────────────────────── */
.cert-wrap {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-banner {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.status-banner.ok {
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.25);
    color: #4ade80;
}
.status-banner.warn {
    background: rgba(234,179,8,.1);
    border: 1px solid rgba(234,179,8,.25);
    color: #facc15;
}
.status-banner .sb-title { font-size: .95rem; font-weight: 700; line-height: 1.2; }
.status-banner .sb-sub   { font-size: .78rem; opacity: .8; margin-top: .2rem; line-height: 1.4; }

.cert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(2px);
    background: #120c0524;
}

.cert-header {
    background: linear-gradient(135deg, var(--gold) 0%, #e67a00 100%);
    padding: 1.1rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.cert-header-left { display: flex; align-items: center; gap: .85rem; }
.cert-logo {
    width: 42px; height: 42px;
    background: rgba(0,0,0,.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
}
.cert-brand {
    font-size: .95rem;
    font-weight: 800;
    color: #000;
    letter-spacing: .04em;
}
.cert-label {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: rgba(0,0,0,.6);
    margin-top: .1rem;
}
.cert-qr {
    width: 72px; height: 72px;
    background: #fff;
    border-radius: 8px;
    padding: 4px;
    object-fit: contain;
    flex-shrink: 0;
}

.cert-product-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
    padding: 1.25rem 1.4rem .5rem;
}

.cert-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: .5rem 1.4rem 1rem;
}
.cert-field {
    padding: .6rem 0;
    border-bottom: 1px solid var(--border);
}
.cert-field:nth-last-child(-n+2):not(.cert-field--full) { border-bottom: none; }
.cert-field--full {
    grid-column: 1 / -1;
    border-bottom: none;
}
.cf-label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
    margin-bottom: .2rem;
    font-weight: 600;
}
.cf-value {
    font-size: .92rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.cert-divider {
    height: 1px;
    background: var(--border);
    margin: 0 1.4rem;
}

.cert-url-strip {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1.4rem;
    background: var(--bg-input);
    margin: 0;
}
.cu-label {
    font-size: .7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    flex-shrink: 0;
}
.cu-url {
    font-size: .75rem;
    color: var(--gold);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cu-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
    font-size: .9rem;
}
.cu-copy:hover { color: var(--gold); background: rgba(255,138,3,.1); }

.cert-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.cert-footer-note {
    font-size: .75rem;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
    .site-main { padding: 1.5rem .75rem 2rem; }
    .hero-title { font-size: 1.5rem; }
    .cert-fields { grid-template-columns: 1fr; }
    .cert-field { border-bottom: 1px solid var(--border); }
    .cert-field:last-child { border-bottom: none; }
    .cert-field--full { border-bottom: none; }
    .cert-field:nth-last-child(-n+2):not(.cert-field--full) { border-bottom: 1px solid var(--border); }
    .cert-actions { flex-direction: column; }
    .cert-actions .btn { width: 100%; justify-content: center; }
    .search-card{
        padding: 0px;
        background: transparent;
        border-color: transparent;
    }
}

/* ── Print ────────────────────────────────────────────── */
@media print {
    body { background: #fff; color: #000; }
    .site-header, .site-footer, .cert-actions,
    .cert-footer-note, .status-banner { display: none !important; }
    .site-main { padding: 0; display: block; }
    .cert-wrap { max-width: 100%; gap: 0; }
    .cert-card {
        background: #fff;
        border: 1px solid #ccc;
        border-radius: 8px;
        break-inside: avoid;
    }
    .cert-header { background: #1a1a1a !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cert-brand { color: #fff !important; }
    .cert-label { color: rgba(255,255,255,.7) !important; }
    .cert-logo  { color: #fff !important; }
    .cert-product-name { color: #000; }
    .cf-label { color: #666; }
    .cf-value { color: #000; }
    .cert-fields { grid-template-columns: 1fr 1fr; }
    .cert-url-strip { background: #f5f5f5; }
    .cu-label { color: #666; }
    .cu-url { color: #b36000; }
    .badge-active   { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .badge-inactive { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .cu-copy { display: none; }
}
.cert-footer-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 16px;
}
.footer-logo-sig {
    height: auto;
    width: 150px;
}
.footer-logo-tigris {
    height: 55px;
    width: 55px;
}


body .lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    margin: auto;
    width: 100%;
    z-index: -1;
}

body .line {
    position: absolute;
    width: 1px;
    height: 100%;
    top: 0;
    left: 50%;
    background: hsla(0, 0%, 100%, 0.00);
    overflow: hidden;
}

body .line::after {
    content: '';
    display: block;
    position: absolute;
    height: 15vh;
    width: 100%;
    top: -50%;
    left: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ff8a03 75%, #ff8a03 100%);
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #ff890333 75%, #5c4121ff 100%);
    animation: drop 7s 0s infinite;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.4, 0.26, 0, 0.97);
}

body .line:nth-child(1) {
    margin-left: -25%;
}

body .line:nth-child(1)::after {
    animation-delay: 2s;
}

body .line:nth-child(3) {
    margin-left: 25%;
}

body .line:nth-child(3)::after {
    animation-delay: 2.5s;
}

@keyframes drop {
    0% {
        top: -50%;
    }
    100% {
        top: 110%;
    }
}


body .space-back {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}
body .star {
    position: absolute;
    bottom: -20px;
    background: radial-gradient(circle, #ffffffd0 0%, rgba(255,255,255,0.4) 60%, transparent 100%);
    background: radial-gradient(circle, #ff890333 0%, #ff89034f 60%, transparent 100%);
    border-radius: 50%;
    opacity: 0;
    animation: rise linear infinite;
}

@keyframes rise {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    15% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(-120vh);
        opacity: 0;
    }
}
