﻿
:root {
    --rei-navy: #063f70;
    --rei-navy-dark: #05365f;
    --rei-blue: #0a8fca;
    --rei-blue-soft: #edf8fd;
    --rei-border: #dbe6ef;
    --rei-text: #133f65;
    --rei-muted: #72869a;
    --rei-danger: #d94242;
    --rei-success: #168c5c;
    --rei-warning: #bb7a14;
}

.rei-page {
    min-height: 100vh;
    padding: 34px 0 75px;
    color: var(--rei-text);
    background: radial-gradient(circle at 82% 13%, rgba(221, 242, 255, .82), transparent 30%), #f7faff;
}

.rei-container {
    width: min(1450px, 94%);
    margin: 0 auto;
}

.rei-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #6d839a;
    font-size: 13px;
}

    .rei-breadcrumb i {
        font-size: 9px;
    }

.rei-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.rei-header-icon,
.rei-title-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    color: var(--rei-blue);
    background: linear-gradient(135deg, #e4f6ff, #f5fbff);
}

.rei-header-icon {
    width: 62px;
    height: 62px;
    font-size: 28px;
}

.rei-header h1 {
    margin: 0;
    color: var(--rei-navy);
    font-size: 32px;
    font-weight: 900;
}

.rei-header p {
    margin: 8px 0 0;
    color: #7e90a2;
}

.rei-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    align-items: start;
}

.rei-main-column,
.rei-side-column {
    display: grid;
    gap: 22px;
}

.rei-card,
.rei-info-card,
.rei-qr-card {
    border: 1px solid rgba(218, 229, 239, .86);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 15px 42px rgba(12, 61, 102, .075);
}

.rei-card {
    padding: 28px 30px;
}

.rei-info-card,
.rei-qr-card {
    padding: 27px 24px;
}

.rei-info-card {
    background: linear-gradient(180deg, #f4faff, #fff);
}

.rei-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.rei-title-icon {
    width: 50px;
    height: 50px;
    font-size: 21px;
}

.rei-section-title span {
    color: #668099;
    font-size: 12px;
    font-weight: 700;
}

.rei-section-title h2 {
    margin: 4px 0 0;
    color: var(--rei-navy);
    font-size: 21px;
}

.rei-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 18px;
    align-items: center;
}

.rei-field label {
    display: block;
    margin-bottom: 9px;
    font-size: 13px;
    font-weight: 800;
}

    .rei-field label b {
        color: var(--rei-danger);
    }

.rei-reference-input {
    position: relative;
}

    .rei-reference-input input {
        width: 100%;
        height: 48px;
        box-sizing: border-box;
        padding: 0 45px 0 14px;
        border: 1px solid var(--rei-border);
        border-radius: 10px;
        outline: none;
        color: #163f62;
        background: #fff;
        font: inherit;
        transition: .2s;
    }

        .rei-reference-input input:focus {
            border-color: #48a9d5;
            box-shadow: 0 0 0 4px rgba(72, 169, 213, .12);
        }

    .rei-reference-input i {
        position: absolute;
        top: 50%;
        right: 15px;
        color: #8aa0b3;
        transform: translateY(-50%);
    }

.rei-field small {
    display: block;
    margin-top: 7px;
    color: #7e8fa0;
    font-size: 11px;
}

.rei-field .field-validation-error {
    display: block;
    margin-top: 7px;
    color: var(--rei-danger);
    font-size: 12px;
}

.rei-search-button {
    height: 48px;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, var(--rei-navy), #086ca5);
    box-shadow: 0 9px 20px rgba(6, 63, 112, .18);
    font: inherit;
    font-weight: 800;
}

    .rei-search-button .rei-loading {
        display: none;
    }

    .rei-search-button.loading > span:first-child {
        display: none;
    }

    .rei-search-button.loading .rei-loading {
        display: inline-flex;
        gap: 8px;
        align-items: center;
    }

.rei-results-layout {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 22px;
}

.rei-status-panel {
    padding: 22px;
    border: 1px solid #e4ebf2;
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfdff, #f7fafc);
}

.rei-status-heading {
    padding-bottom: 18px;
    border-bottom: 1px solid #e5edf3;
}

    .rei-status-heading > span {
        display: block;
        margin-bottom: 9px;
        color: #6e8498;
        font-size: 12px;
    }

.rei-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
}

    .rei-status-badge.success {
        color: #11865a;
        background: #def6ea;
    }

    .rei-status-badge.processing {
        color: #a16a0d;
        background: #fff1d6;
    }

    .rei-status-badge.outside {
        color: #b23939;
        background: #ffe4e4;
    }

    .rei-status-badge.unknown {
        color: #5f7183;
        background: #e8edf2;
    }

.rei-status-list {
    display: grid;
    gap: 18px;
    padding-top: 20px;
}

.rei-status-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

    .rei-status-item > i {
        width: 22px;
        margin-top: 3px;
        color: #087eb8;
        font-size: 18px;
        text-align: center;
    }

    .rei-status-item span {
        display: block;
        margin-bottom: 3px;
        color: #71859a;
        font-size: 11px;
    }

    .rei-status-item strong {
        color: #244b6c;
        font-size: 13px;
    }

.rei-details-table {
    overflow: hidden;
    border: 1px solid #e1e9f0;
    border-radius: 14px;
}

.rei-detail-row {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    min-height: 48px;
    border-bottom: 1px solid #e8eef3;
}

    .rei-detail-row:last-child {
        border-bottom: 0;
    }

    .rei-detail-row span,
    .rei-detail-row strong {
        display: flex;
        align-items: center;
        padding: 11px 15px;
        font-size: 13px;
    }

    .rei-detail-row span {
        color: #164b76;
        font-weight: 800;
        background: #f7fafc;
    }

    .rei-detail-row strong {
        color: #4c6276;
        font-weight: 600;
    }

.rei-open-document {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: min(100%, 260px);
    margin: 22px auto 0;
    padding: 13px 20px;
    border-radius: 10px;
    color: #fff;
    background: linear-gradient(135deg, #064675, #087db8);
    box-shadow: 0 9px 20px rgba(6, 70, 117, .18);
    font-weight: 800;
    text-decoration: none;
}

.rei-processing-note,
.rei-outside-note {
    display: flex;
    gap: 13px;
    margin-top: 20px;
    padding: 17px;
    border-radius: 12px;
}

.rei-processing-note {
    color: #8b5d12;
    border: 1px solid #f2daa8;
    background: #fff8e8;
}

.rei-outside-note {
    color: #a53636;
    border: 1px solid #f0c8c8;
    background: #fff2f2;
}

    .rei-processing-note > i,
    .rei-outside-note > i {
        margin-top: 4px;
        font-size: 22px;
    }

    .rei-processing-note p,
    .rei-outside-note p {
        margin: 5px 0 0;
        line-height: 1.7;
        font-size: 12px;
    }

.rei-info-card h3,
.rei-qr-card h3 {
    margin: 0 0 27px;
    color: #0d72a9;
    font-size: 18px;
}

    .rei-info-card h3 i {
        margin-left: 8px;
    }

.rei-info-item {
    display: flex;
    gap: 14px;
    margin-bottom: 25px;
}

    .rei-info-item:last-child {
        margin-bottom: 0;
    }

    .rei-info-item > i {
        width: 31px;
        color: #0b91ca;
        font-size: 24px;
        text-align: center;
    }

    .rei-info-item strong {
        color: #104972;
    }

    .rei-info-item p {
        margin: 6px 0 0;
        color: #71869b;
        font-size: 13px;
        line-height: 1.8;
    }

.rei-qr-card {
    text-align: center;
}

.rei-qr-image {
    width: 220px;
    max-width: 100%;
    margin: 0 auto 18px;
    padding: 12px;
    box-sizing: border-box;
    border: 1px solid #b9dceb;
    border-radius: 12px;
    background: #fff;
}

    .rei-qr-image img {
        display: block;
        width: 100%;
    }

.rei-qr-code span {
    color: #71869b;
    font-size: 12px;
}

.rei-qr-code strong {
    display: block;
    margin-top: 5px;
    color: #0b4775;
    font-size: 16px;
}

.rei-qr-card > p {
    margin: 17px 0;
    color: #75889a;
    font-size: 12px;
    line-height: 1.8;
}

.rei-qr-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.rei-print-button,
.rei-close-button {
    padding: 11px;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
}

.rei-print-button {
    border: 0;
    color: #fff;
    background: var(--rei-navy);
}

.rei-close-button {
    color: #31556e;
    border: 1px solid #d4e0e9;
    background: #fff;
}

.rei-alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 11px;
}

    .rei-alert:empty {
        display: none;
    }

.rei-alert-error {
    color: #ae3434;
    border: 1px solid #ffd3d3;
    background: #fff1f1;
}

.rei-alert-info {
    color: #176188;
    border: 1px solid #cde9f6;
    background: #eff9fd;
}

    .rei-alert-info i {
        margin-left: 7px;
    }

@media (max-width: 1100px) {
    .rei-layout {
        grid-template-columns: 1fr;
    }

    .rei-side-column {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .rei-results-layout {
        grid-template-columns: 1fr;
    }

    .rei-side-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .rei-page {
        padding-top: 22px;
    }

    .rei-header h1 {
        font-size: 25px;
    }

    .rei-card {
        padding: 21px 16px;
    }

    .rei-search-row {
        grid-template-columns: 1fr;
    }

    .rei-detail-row {
        grid-template-columns: 1fr;
    }

        .rei-detail-row strong {
            padding-top: 0;
            background: #f7fafc;
        }
}

@media print {
    body * {
        visibility: hidden !important;
    }

    #qrCard,
    #qrCard * {
        visibility: visible !important;
    }

    #qrCard {
        position: absolute;
        top: 20px;
        right: 50%;
        width: 380px;
        max-width: calc(100% - 40px);
        border: 1px solid #333;
        box-shadow: none;
        transform: translateX(50%);
    }

    .rei-qr-actions {
        display: none !important;
    }
}
