:root {
    --primary: #800260;
    --primary-soft: #f7edf4;
    --dark: #17131a;
    --text: #27212a;
    --muted: #746d77;
    --line: #ebe6eb;
    --bg: #f7f6f8;
    --green: #12a06a;
    --red: #d54d4d;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
}

button {
    font: inherit;
}

.topbar {
    height: 82px;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    font-size: 23px;
    font-weight: 800;
}

.brand-name {
    font-weight: 800;
    font-size: 18px;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--muted);
}

.privacy-badge {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #ecfaf4;
    color: #08794d;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}

.privacy-dot {
    width: 8px;
    height: 8px;
    background: var(--green);
    border-radius: 50%;
}

.page {
    width: min(1120px, 92vw);
    margin: 45px auto 80px;
}

.hero {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 38px;
    align-items: center;
    margin-bottom: 32px;
}

.eyebrow {
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.hero h1 {
    font-size: clamp(33px, 4vw, 53px);
    line-height: 1.08;
    margin: 12px 0 15px;
    letter-spacing: -0.035em;
}

.hero p {
    color: var(--muted);
    line-height: 1.65;
    max-width: 700px;
}

.security-card {
    padding: 23px;
    border-radius: 18px;
    background: var(--primary);
    color: white;
    display: flex;
    gap: 15px;
    align-items: center;
    box-shadow: 0 18px 40px rgba(128, 2, 96, .18);
}

.security-card .shield {
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    display: grid;
    place-items: center;
    font-size: 21px;
}

.security-card strong,
.security-card span {
    display: block;
}

.security-card span {
    font-size: 12px;
    opacity: .78;
    margin-top: 4px;
}

.reader-card,
.customer-card,
.privacy-section {
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 30px;
    margin-top: 24px;
    box-shadow: 0 8px 30px rgba(20, 12, 20, .035);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2 {
    margin: 4px 0;
    font-size: 23px;
}

.section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.mode-badge {
    padding: 8px 11px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    border-radius: 7px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 13px;
    margin: 27px 0;
}

.status-box {
    min-height: 82px;
    border: 1px solid var(--line);
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px;
}

.status-box small,
.status-box strong {
    display: block;
}

.status-box small {
    color: var(--muted);
    margin-bottom: 5px;
}

.status-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.status-dot.online {
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(18,160,106,.1);
}

.status-dot.offline {
    background: #bdb8bf;
}

.reader-actions,
.customer-actions {
    display: flex;
    gap: 11px;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 11px;
    padding: 12px 19px;
    cursor: pointer;
    font-weight: 700;
    transition: .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.btn.primary {
    background: var(--primary);
    color: white;
}

.btn.dark {
    background: var(--dark);
    color: white;
}

.btn.outline {
    background: white;
    color: var(--text);
    border: 1px solid #dcd6dd;
}

.btn.danger {
    background: #fff1f1;
    color: #b73838;
}

.developer-note {
    font-size: 12px;
    color: var(--muted);
    margin: 17px 0 0;
}

.message {
    padding: 13px 16px;
    background: #f8f5f7;
    border: 1px solid var(--line);
    border-radius: 11px;
    font-size: 13px;
    margin: 0 0 18px;
}

.message.error {
    background: #fff1f1;
    color: #a83232;
    border-color: #f5cdcd;
}

.message.success {
    background: #effaf5;
    color: #08794d;
    border-color: #cfefdf;
}

.customer-layout {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 31px;
    margin-top: 28px;
}

.photo-frame {
    aspect-ratio: .77;
    border-radius: 17px;
    overflow: hidden;
    background: #f2eff3;
    border: 1px solid var(--line);
}

.photo-placeholder {
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    color: #aaa2ac;
}

.photo-placeholder span {
    font-size: 12px;
}

.photo-placeholder strong {
    font-size: 25px;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-note {
    color: var(--muted);
    display: block;
    font-size: 10px;
    text-align: center;
    margin-top: 9px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 13px;
}

.field {
    border: 1px solid var(--line);
    background: #fcfbfc;
    border-radius: 13px;
    padding: 14px 16px;
    min-height: 72px;
}

.field.wide {
    grid-column: 1 / -1;
}

.field label {
    color: var(--muted);
    display: block;
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.value {
    font-size: 15px;
    font-weight: 650;
}

.monospace {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.multiline {
    white-space: pre-line;
    line-height: 1.5;
}

.customer-actions {
    margin-top: 25px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

.text-button {
    background: transparent;
    border: 0;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.memory-notice {
    margin-top: 22px;
    padding: 15px 17px;
    background: #faf8fa;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.memory-notice strong {
    font-size: 12px;
}

.memory-notice span {
    font-size: 11px;
    line-height: 1.5;
    color: var(--muted);
}

.privacy-section h2 {
    font-size: 25px;
    margin: 8px 0 23px;
}

.privacy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
}

.privacy-grid div {
    padding: 14px;
    border-radius: 11px;
    background: #faf8fa;
    color: #554d57;
    font-size: 12px;
    font-weight: 650;
}

footer {
    text-align: center;
    padding: 25px;
    color: #8c858e;
    font-size: 11px;
}

.hidden {
    display: none !important;
}

@media (max-width: 800px) {
    .privacy-badge {
        display: none;
    }

    .hero {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    .customer-layout {
        grid-template-columns: 1fr;
    }

    .photo-column {
        width: 180px;
    }

    .privacy-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .page {
        width: 94vw;
        margin-top: 25px;
    }

    .reader-card,
    .customer-card,
    .privacy-section {
        padding: 20px;
    }

    .details-grid,
    .privacy-grid {
        grid-template-columns: 1fr;
    }

    .field.wide {
        grid-column: auto;
    }

    .reader-actions .btn,
    .customer-actions .btn {
        width: 100%;
    }
}
