:root {
    --brand: #064b87;
    --brand-deep: #08365f;
    --ink: #17232d;
    --muted: #5f6b74;
    --paper: #ffffff;
    --surface: #f4f7f8;
    --line: #d9e1e5;
    --accent: #d8a935;
    --success: #267258;
    --danger: #b53a42;
    --shadow: 0 18px 48px rgba(18, 42, 60, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--surface);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    font-family: "DM Sans", sans-serif;
    letter-spacing: 0;
    background-color: var(--surface);
    background-image:
        linear-gradient(rgba(6, 75, 135, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 75, 135, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

button,
input,
textarea {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    width: 100%;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.header-inner {
    width: min(1080px, calc(100% - 40px));
    min-height: 84px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand-logo {
    display: block;
    width: 184px;
    height: auto;
}

.portal-name {
    color: var(--brand-deep);
    font-family: "Manrope", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
}

.page-shell {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: clamp(48px, 8vh, 88px) 0 40px;
}

.access-panel {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: clamp(28px, 5vw, 48px);
    border-top: 5px solid var(--brand);
    border-radius: 6px;
    background: var(--paper);
    box-shadow: var(--shadow);
}

.panel-heading {
    margin-bottom: 32px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--brand-deep);
    font-family: "Manrope", sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.35rem);
    line-height: 1.16;
    letter-spacing: 0;
}

h2 {
    margin: 0;
    color: var(--brand-deep);
    font-family: "Manrope", sans-serif;
    font-size: 1.45rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.lead {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.tenant-form label,
.claim-form label {
    display: block;
    margin-bottom: 9px;
    font-weight: 700;
}

.claim-form {
    margin-top: 26px;
}

.claim-form label:not(:first-child) {
    margin-top: 22px;
}

.claim-form input,
.claim-form textarea {
    width: 100%;
    border: 1px solid #aebbc3;
    border-radius: 6px;
    outline: 0;
    padding: 13px 14px;
    color: var(--ink);
    background: var(--paper);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.claim-form input {
    min-height: 50px;
}

.claim-form textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.5;
}

.claim-form input:focus,
.claim-form textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(6, 75, 135, 0.12);
}

.input-wrap {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    min-height: 58px;
    border: 1px solid #aebbc3;
    border-radius: 6px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input-wrap:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(6, 75, 135, 0.12);
}

.input-prefix {
    display: grid;
    place-items: center;
    border-right: 1px solid var(--line);
    color: var(--brand);
    font-weight: 700;
}

.input-wrap input {
    width: 100%;
    min-width: 0;
    border: 0;
    border-radius: 0 6px 6px 0;
    outline: 0;
    padding: 0 16px;
    color: var(--ink);
    font-size: 1.12rem;
    font-weight: 600;
}

.field-help,
.feedback {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
}

.feedback {
    min-height: 21px;
    font-weight: 600;
}

.feedback.is-error {
    color: var(--danger);
}

.field-help.is-error {
    color: var(--danger);
    font-weight: 600;
}

.claim-files-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.claim-file-preview {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
}

.claim-file-preview img,
.claim-file-preview video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background: #e5eaed;
}

.claim-file-preview span {
    display: block;
    overflow: hidden;
    padding: 7px;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feedback.is-info {
    color: var(--success);
}

.primary-action {
    width: 100%;
    min-height: 54px;
    margin-top: 18px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    background: var(--brand);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease;
}

.primary-action:hover {
    background: var(--brand-deep);
}

.primary-action:active {
    transform: translateY(1px);
}

.primary-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.tenant-confirmation,
.otp-access,
.claims-dashboard,
.claim-workspace,
.claim-result {
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.session-actions {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
}

.session-actions .feedback {
    flex: 1 1 auto;
    margin: 0;
}

.compact-secondary {
    flex: 0 0 auto;
    min-height: 42px;
    margin: 0;
    padding: 0 16px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.compact-action {
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: #fff;
    background: var(--brand);
    font-weight: 700;
    cursor: pointer;
}

.claims-list {
    margin-top: 18px;
    display: grid;
    gap: 10px;
}

.claim-list-item {
    width: 100%;
    min-height: 72px;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--paper);
    text-align: left;
    cursor: pointer;
}

.claim-list-item:hover {
    border-color: var(--brand);
    background: #f8fbfd;
}

.claim-list-content {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.claim-list-content strong {
    overflow-wrap: anywhere;
}

.claim-list-content span,
.claims-empty {
    color: var(--muted);
    font-size: 0.86rem;
}

.claims-empty {
    margin: 0;
    padding: 28px 16px;
    border: 1px dashed #aebbc3;
    border-radius: 6px;
    text-align: center;
}

.status-badge {
    max-width: 150px;
    padding: 5px 8px;
    border-left: 4px solid #6c757d;
    border-radius: 4px;
    color: var(--brand-deep);
    background: #e5eef5;
    font-size: 0.76rem;
    font-weight: 700;
    text-align: center;
}

.status-imported {
    color: #17533e;
    background: #dcefe7;
}

.status-rejected {
    color: #7d252c;
    background: #f6dfe1;
}

.tenant-summary {
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-block: 1px solid var(--line);
}

.tenant-summary div {
    min-width: 0;
    padding: 14px 12px 14px 0;
}

.tenant-summary dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.tenant-summary dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.confirmation-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.secondary-action {
    min-height: 54px;
    margin-top: 18px;
    padding: 0 18px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    color: var(--brand);
    background: var(--paper);
    font-weight: 700;
    cursor: pointer;
}

.secondary-action:disabled {
    cursor: wait;
    opacity: 0.65;
}

.result-copy {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.claim-summary {
    margin: 24px 0 0;
    border-block: 1px solid var(--line);
}

.claim-summary div {
    padding: 14px 0;
}

.claim-summary div + div {
    border-top: 1px solid var(--line);
}

.claim-summary dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.claim-summary dd {
    margin: 5px 0 0;
    overflow-wrap: anywhere;
    color: var(--brand-deep);
    font-weight: 700;
}

.claim-summary .claim-description {
    white-space: pre-wrap;
    color: var(--ink);
    font-weight: 500;
    line-height: 1.55;
}

.primary-action:focus-visible,
.secondary-action:focus-visible,
.claim-form input:focus-visible,
.claim-form textarea:focus-visible,
.support-band a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.arrow {
    font-size: 1.25rem;
    line-height: 1;
}

.support-band {
    width: min(100%, 720px);
    margin: 28px auto 0;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, 0.78);
}

.support-band div {
    display: grid;
    gap: 3px;
}

.support-band span {
    color: var(--muted);
    font-size: 0.9rem;
}

.support-contact {
    flex: 0 0 auto;
    color: var(--brand);
    font-weight: 700;
}

.site-footer {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0 max(22px, env(safe-area-inset-bottom));
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 0.78rem;
}

@media (max-width: 600px) {
    .header-inner,
    .page-shell,
    .site-footer {
        width: min(100% - 28px, 1080px);
    }

    .header-inner {
        min-height: 72px;
    }

    .brand-logo {
        width: 145px;
    }

    .portal-name {
        max-width: 110px;
        text-align: right;
    }

    .page-shell {
        padding-top: 28px;
    }

    .access-panel {
        padding: 28px 22px;
    }

    .support-band,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-summary,
    .confirmation-actions {
        grid-template-columns: 1fr;
    }

    .secondary-action {
        margin-top: 0;
    }

    .section-heading,
    .claim-list-item {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .section-heading {
        flex-direction: column;
    }

    .compact-action,
    .status-badge {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.compact-lead {
    margin-top: 10px;
    font-size: 0.95rem;
}

.email-options {
    margin: 18px 0;
    padding: 12px 14px;
    border-left: 4px solid var(--brand);
    color: var(--brand-deep);
    background: #edf4f8;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.test-notice {
    margin: 16px 0;
    padding: 12px 14px;
    border: 1px solid #c49628;
    border-radius: 6px;
    color: #5f470e;
    background: #fff4d5;
    font-weight: 700;
}

#otp-email {
    width: 100%;
    min-height: 58px;
    border: 1px solid #aebbc3;
    border-radius: 6px;
    outline: 0;
    padding: 0 16px;
    color: var(--ink);
    background: var(--paper);
    font-size: 1.05rem;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

#otp-email:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(6, 75, 135, 0.12);
}

.text-action {
    margin-top: 18px;
    padding: 8px 0;
    border: 0;
    color: var(--brand);
    background: transparent;
    font-weight: 700;
    cursor: pointer;
}