:root {
    --purple: #582582;
    --purple-dark: #35104f;
    --purple-light: #7c3aed;
    --purple-soft: #f3eafd;
    --gold: #d3aa4e;

    --background: #f7f4fa;
    --surface: #ffffff;
    --text: #251b2e;
    --muted: #746b7d;
    --border: #e7deed;

    --shadow: 0 20px 55px rgba(64, 25, 91, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.public-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.13);
    background: var(--purple-dark);
}

.public-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.public-navbar {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    color: #ffffff;
}

.public-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.public-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: transparent;
}

.public-brand-text strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.public-brand-text span {
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
}

.admin-login-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 700;
}

.admin-login-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.hero {
    position: relative;
    min-height: 510px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #ffffff;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(255, 255, 255, 0.15),
            transparent 25%
        ),
        radial-gradient(
            circle at 15% 80%,
            rgba(211, 170, 78, 0.22),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #35104f 0%,
            #582582 52%,
            #7c3aed 100%
        );
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
}

.hero::before {
    width: 430px;
    height: 430px;
    top: -210px;
    right: 8%;
}

.hero::after {
    width: 350px;
    height: 350px;
    bottom: -220px;
    left: 5%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 770px;
    padding: 75px 0 150px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.hero-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 5px rgba(211, 170, 78, 0.15);
}

.hero h1 {
    margin: 0 0 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(40px, 6vw, 68px);
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero p {
    max-width: 650px;
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
    line-height: 1.7;
}

.search-section {
    position: relative;
    z-index: 5;
    margin-top: -95px;
    padding-bottom: 70px;
}

.search-card {
    padding: 31px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-card-header {
    margin-bottom: 24px;
    text-align: center;
}

.search-card-header h2 {
    margin: 0 0 9px;
    font-size: 26px;
}

.search-card-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.form-group {
    margin: 0;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 800;
}

.form-control {
    width: 100%;
    min-height: 52px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition: 0.2s ease;
}

.form-control:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.form-control::placeholder {
    color: #aaa0b2;
}

.search-button {
    min-height: 52px;
    padding: 12px 24px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        var(--purple),
        var(--purple-light)
    );
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 25px rgba(88, 37, 130, 0.22);
}

.search-button:hover {
    transform: translateY(-1px);
}

.search-hint {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.public-alert {
    margin-top: 22px;
    padding: 15px 17px;
    border-radius: 12px;
    line-height: 1.5;
}

.public-alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.result-card {
    margin-top: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #ffffff;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--purple-dark),
        var(--purple)
    );
}

.result-check {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 22px;
}

.result-header h3 {
    margin: 0 0 5px;
}

.result-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
}

.result-body {
    padding: 24px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.result-item {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #faf8fc;
}

.result-item-wide {
    grid-column: span 2;
}

.result-label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.result-value {
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.download-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 21px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.download-button {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border-radius: 11px;
    background: var(--purple);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.download-button-secondary {
    border: 1px solid #ccb6dd;
    background: #ffffff;
    color: var(--purple);
}

.public-footer {
    padding: 25px 0;
    border-top: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

@media (max-width: 800px) {
    .search-form {
        grid-template-columns: 1fr;
    }

    .search-button {
        width: 100%;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .result-item-wide {
        grid-column: span 1;
    }
}

@media (max-width: 600px) {
    .public-container {
        width: min(100% - 24px, 1180px);
    }

    .public-brand-text span {
        display: none;
    }

    .admin-login-link {
        padding: 8px 11px;
        font-size: 11px;
    }

    .hero {
        min-height: 460px;
    }

    .hero-content {
        padding-top: 60px;
    }

    .hero h1 {
        font-size: 39px;
    }

    .search-card {
        padding: 22px 17px;
    }

    .download-actions {
        flex-direction: column;
    }

    .download-button {
        width: 100%;
    }
}