:root {
    --brand: #127bcb;
    --brand-dark: #0d5d9a;
    --brand-light: #e6f2fb;
    --muted: #6b7280;
    --card-radius: 16px;
    --gap: 16px;
    --section-padding: 24px;
    --transition: all 0.3s ease;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', system-ui, sans-serif;
    background:
        linear-gradient(rgba(255,255,255,0.65), rgba(255,255,255,0.65)),
        url('https://scrollwell.com/find/swbg.svg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gap);
    flex: 1;
}

@media (min-width: 992px) {
    .container {
        grid-template-columns: 280px 1fr;
    }
}

.topbar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.back-btn {
    background: var(--brand);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: var(--brand-dark);
}

.header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    grid-column: 1 / -1;
}

.logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.header-content h1 {
    font-family: 'Inter', sans-serif;
    font-size: 26px;
    color: var(--brand);
    margin-bottom: 4px;
    line-height: 1.2;
}

.header-content p {
    color: var(--muted);
    font-size: 15px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-radius: 12px;
    background: var(--brand-light);
    color: var(--brand-dark);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    gap: 12px;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 12px rgba(18, 123, 203, 0.2);
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.main-content {
    background: #fff;
    border-radius: var(--card-radius);
    padding: var(--section-padding);
    box-shadow: var(--shadow);
    border-top: 5px solid var(--brand);
    min-height: 500px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: var(--brand);
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #334155;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: none;
    box-shadow: 0 0 0 3px rgba(18, 123, 203, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-row input {
    flex: 1;
}

button,
.button-link {
    background: var(--brand);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    text-decoration: none;
    min-height: 40px;
}

button:hover,
.button-link:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

button.secondary,
.button-link.secondary {
    background: #e6f1fb;
    color: var(--brand-dark);
}

button.secondary:hover,
.button-link.secondary:hover {
    background: #d4e8ff;
}

.feedback {
    color: var(--danger);
    font-size: 13px;
    margin-top: 5px;
}

.result-box {
    margin-top: 24px;
    animation: fadeIn 0.4s ease;
}

.hidden {
    display: none !important;
}

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

.find-summary {
    margin-bottom: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #1C74C8;
    border: 1px solid #1C74C8;
    box-shadow: 0 10px 24px rgba(28, 116, 200, 0.18);
}

.find-summary-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 6px;
}

.find-summary-line {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.96);
}

.find-summary-line:last-child {
    margin-bottom: 0;
}

.certificate-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.download-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.download-card {
    border-radius: 20px;
    border: 1px solid #dbe6f1;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
    padding: 18px;
}

.download-card-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.download-card-title {
    color: #142338;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 700;
}

.download-card-badge,
.category-pill,
.valid-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.download-card-badge,
.valid-pill {
    background: #eff9f1;
    color: #15934a;
}

.download-card-badge::before,
.valid-pill::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.category-pill {
    background: #edf4ff;
    color: #1C74C8;
}

.download-card-id {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    background: #edf4ff;
    color: #1C74C8;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
}

.download-card-meta {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.download-card-row {
    display: grid;
    gap: 4px;
}

.download-card-label,
.verified-card-label {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.download-card-value,
.verified-card-value {
    color: #243244;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 600;
    word-break: break-word;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #e6edf5;
}

.download-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: #1C74C8;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(28, 116, 200, 0.22);
    transition: var(--transition);
    border: none;
}

.download-card-link:hover {
    background: #165fa4;
    color: #ffffff;
}

.share-menu {
    position: relative;
}

.share-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid #dbe6f1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 8px;
    display: none;
    z-index: 10;
}

.share-menu.open .share-dropdown {
    display: block;
}

.share-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: #243244;
    justify-content: flex-start;
    padding: 10px 12px;
    box-shadow: none;
}

.share-item:hover {
    background: #eef6ff;
    color: #1C74C8;
    transform: none;
}

.empty-state,
.info-card,
.skeleton-card {
    border: 1px solid #dbe6f1;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    padding: 20px;
}

.empty-state p {
    color: #5e7085;
    font-size: 14px;
    margin-bottom: 14px;
}

.skeleton-card {
    overflow: hidden;
    position: relative;
}

.skeleton-line {
    height: 12px;
    border-radius: 999px;
    background: #eaf1f8;
    margin-bottom: 12px;
}

.skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-card::after {
    content: '';
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.verify-shell {
    max-width: 760px;
    margin: 0 auto;
}

.verify-panel {
    border: 1px solid #dbe6f1;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 28px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.verify-form-card {
    border: 1px solid #dbe6f1;
    border-radius: 18px;
    background: #fff;
    padding: 18px;
}

.verify-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 12px;
    margin-bottom: 0;
}

.verify-search-row input {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    padding: 0 16px;
    font-size: 15px;
    color: #0f172a;
    background: #fff;
}

.verify-search-row button {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
}

.verified-card,
.not-found-card {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid #dbe6f1;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.verified-card-header,
.not-found-card-header {
    background: linear-gradient(90deg, #1f5f9f 0%, #2c82d9 100%);
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.not-found-card-header {
    background: linear-gradient(90deg, #8a1f1f 0%, #d92c2c 100%);
}

.verified-card-headline {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.verified-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    flex-shrink: 0;
}

.verified-card-text h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    line-height: 1.08;
    color: #ffffff;
    margin-bottom: 4px;
}

.verified-card-text p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.verified-card-body,
.not-found-card-body {
    padding: 24px 30px 22px;
}

.verified-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.verified-card-field.full-width {
    grid-column: 1 / -1;
}

.verified-card-value.name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    line-height: 1.1;
    color: #0f172a;
}

.verified-card-value.cert-id {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: #eef4ff;
    color: #1f5fba;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.qr-box {
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.qr-box img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border: 1px solid #dbe6f1;
    border-radius: 16px;
    background: #fff;
    padding: 10px;
}

.verified-card-footer,
.not-found-card-footer {
    border-top: 1px solid #dbe6f1;
    background: #fbfdff;
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.verified-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
}

.verified-card-meta i {
    color: var(--success);
    font-size: 16px;
}

.faq-list {
    display: grid;
    gap: 18px;
}

.faq-group {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
    background: #ffffff;
}

.faq-group h3 {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: var(--brand-dark);
    margin-bottom: 14px;
}

.faq-item {
    border-top: 1px solid #f1f5f9;
    padding: 14px 0;
}

.faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.faq-q:hover {
    color: var(--brand);
    transform: none;
    background: none;
}

.faq-a {
    display: none;
    margin-top: 8px;
    color: #555;
    font-size: 13px;
    line-height: 1.5;
}

.faq-a.show {
    display: block;
}

.support-note {
    font-size: 13px;
    color: var(--muted);
}

.toast-stack {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: grid;
    gap: 10px;
    z-index: 1000;
}

.toast {
    min-width: 260px;
    max-width: 340px;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
    color: #fff;
    animation: fadeIn 0.2s ease;
}

.toast.success {
    background: #16a34a;
}

.toast.error {
    background: #dc2626;
}

.toast.info {
    background: #127bcb;
}

.footer {
    grid-column: 1 / -1;
    text-align: center;
    padding: 25px 0;
    color: var(--muted);
    font-size: 13px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.footer a {
    color: var(--brand);
    text-decoration: none;
}

@media (max-width: 768px) {
    .verify-panel {
        padding: 22px 18px;
    }

    .verify-search-row,
    .verified-card-grid,
    .download-grid {
        grid-template-columns: 1fr;
    }

    .verified-card-header,
    .not-found-card-header {
        flex-direction: column;
    }

    .verified-card-headline {
        align-items: flex-start;
    }

    .verified-card-icon {
        width: 56px;
        height: 56px;
        border-radius: 14px;
        font-size: 24px;
    }

    .verified-card-text h3 {
        font-size: 20px;
    }

    .verified-card-body,
    .verified-card-footer,
    .verified-card-header,
    .not-found-card-body,
    .not-found-card-footer,
    .not-found-card-header {
        padding-left: 18px;
        padding-right: 18px;
    }
}

