* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f3f6fb;
    color: #1f2937;
    overflow-x: hidden;
}

.portal-shell {
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    padding: 28px 16px 42px;
    gap: 28px;
    overflow-x: hidden;
}

.portal-card {
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: 960px;
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    padding: 24px;
    overflow: hidden;
}

.portal-header-banner {
    position: relative;
    width: auto;
    margin: -24px -24px 20px;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    height: 180px;
}

.portal-header-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    display: block;
}

.portal-header-banner-overlay {
    display: none;
}

.portal-header-banner-text {
    position: absolute;
    bottom: 20px;
    left: 0;
    background: #ffffff;
    border-radius: 0 8px 8px 0;
    padding: 18px 14px 8px 24px;
}

.portal-header-banner-text .eyebrow {
    color: #03b167;
}

.portal-header-banner-text h1 {
    margin: 3px 0 0;
    font-size: 26px;
    color: #0f2f5b;
    text-shadow: none;
}

.portal-header h1 {
    margin: 4px 0 10px;
    font-size: 30px;
    color: #0f2f5b;
}

.eyebrow {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #64748b;
    font-weight: 700;
}

.subtitle {
    margin: 0 0 18px;
    color: #475569;
    font-size: 14px;
}

.public-form-back-link {
    margin: -6px 0 18px;
    font-size: 13px;
}

.public-form-back-link a {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
}

.public-form-back-link a:hover {
    text-decoration: underline;
}

.public-portal-page {
    background:
        radial-gradient(circle at top left, rgba(29, 78, 137, 0.12), transparent 32rem),
        #f3f6fb;
}

.public-portal-card {
    max-width: 1120px;
    padding: 0;
    overflow: hidden;
}

.public-portal-hero {
    padding: 34px;
    background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
    border-bottom: 1px solid #dbe4ef;
}

.public-portal-hero-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.public-portal-account-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.public-portal-account-action {
    gap: 8px;
}

.public-portal-account-action::after {
    content: "\2192";
    font-size: 16px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.public-portal-account-action:hover::after {
    transform: translateX(3px);
}

.public-portal-account-actions .public-portal-secondary-action {
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
}

.public-portal-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    align-items: end;
}

.public-portal-hero h1 {
    margin: 6px 0 12px;
    max-width: 720px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.public-portal-subtitle {
    max-width: 680px;
    font-size: 17px;
    line-height: 1.6;
}

.public-portal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    max-width: 100%;
}

.public-portal-primary-action,
.public-portal-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border-radius: 999px;
    padding: 0 32px;
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    max-width: 100%;
}

.public-portal-primary-action {
    background: #0f2f5b;
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 47, 91, 0.18);
}

.public-portal-primary-action:hover {
    background: #1d4e89;
}

.public-portal-secondary-action {
    border: 1px solid #bfd0e4;
    background: #ffffff;
    color: #0f2f5b;
}

.public-portal-secondary-action:hover {
    background: #f8fafc;
}

.public-portal-auth-status {
    margin: 14px 0 0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
}

.public-portal-status-card {
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    padding: 20px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.public-portal-status-card img {
    display: block;
    width: 100%;
    height: 168px;
    margin-bottom: 16px;
    border-radius: 14px;
    object-fit: cover;
}

.public-portal-status-card span,
.public-portal-section-kicker {
    display: block;
    margin-bottom: 8px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.public-portal-status-card strong {
    display: block;
    color: #0f172a;
    font-size: 20px;
    line-height: 1.25;
}

.public-portal-status-card p {
    margin: 12px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.public-portal-section {
    padding: 30px 34px;
    border-bottom: 1px solid #e2e8f0;
}

.public-portal-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.public-portal-section h2 {
    margin: 0;
    color: #0f172a;
    font-size: 26px;
    letter-spacing: -0.02em;
}

.public-portal-section h3 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 16px;
}

.public-portal-section p {
    color: #475569;
}

.public-portal-process {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.public-portal-step-grid,
.public-portal-checklist {
    display: grid;
    gap: 14px;
}

.public-portal-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-portal-step-card,
.public-portal-check-item {
    border: 1px solid #dbe4ef;
    border-radius: 16px;
    background: #ffffff;
    padding: 18px;
}

.public-portal-step-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1d4ed8;
    font-weight: 800;
}

.public-portal-step-card p,
.public-portal-check-item p,
.public-portal-submit-panel p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.public-portal-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    background: #f8fafc;
}

.public-portal-photo-card {
    overflow: hidden;
    border: 1px solid #dbe4ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.public-portal-photo-card img {
    display: block;
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.public-portal-photo-card div {
    padding: 16px;
}

.public-portal-photo-card strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 15px;
}

.public-portal-photo-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.public-portal-section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
    gap: 22px;
    align-items: end;
    margin-bottom: 18px;
}

.public-portal-section-heading p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.public-portal-checklist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.public-portal-check-item {
    position: relative;
    padding-left: 48px;
}

.public-portal-check-item::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 20px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.public-portal-check-item strong {
    display: block;
    margin-bottom: 7px;
    color: #0f172a;
    font-size: 15px;
}

.public-portal-submit-panel {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
}

.public-portal-submit-panel > div {
    max-width: 650px;
}

.public-portal-submit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.meta-banner {
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 13px;
    padding: 10px 12px;
}

.message {
    margin-bottom: 16px;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
}

.message.success {
    background: #ecfdf3;
    border: 1px solid #86efac;
    color: #166534;
}

.message.error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.message .message-link {
    display: inline-block;
    margin-left: 8px;
    font-weight: 700;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.message .message-link:hover,
.message .message-link:focus-visible {
    text-decoration-thickness: 2px;
    outline: none;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.phone-field:has(input.is-invalid) {
    border-color: #be123c !important;
    background: #fff7f8;
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.12);
}

input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    border-color: #be123c !important;
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.2);
}

.public-multi-dropdown-summary.is-invalid {
    border-color: #be123c;
    box-shadow: 0 0 0 3px rgba(190, 18, 60, 0.12);
    background: #fff7f8;
}

#public-boundary-tabs.is-invalid {
    outline: 2px solid #be123c;
    outline-offset: 2px;
    background: #fff7f8;
    border-radius: 10px;
    box-shadow: 0 0 0 4px rgba(190, 18, 60, 0.1);
    animation: publicInvalidPulse 0.9s ease-out 1;
}

.public-field-error-text {
    display: block;
    margin: 4px 0 6px;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: #be123c;
    line-height: 1.3;
}

.public-invalid-highlight {
    animation: publicInvalidPulse 0.9s ease-out 1;
}

@keyframes publicInvalidPulse {
    0% { box-shadow: 0 0 0 0 rgba(190, 18, 60, 0.45); }
    60% { box-shadow: 0 0 0 8px rgba(190, 18, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(190, 18, 60, 0); }
}

.public-summary-strip {
    display: none;
}

.public-sidebar-summary {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.public-sidebar-summary-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}

.public-sidebar-summary-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
    line-height: 1.3;
    word-break: break-word;
}

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

.public-sidebar-summary-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.public-sidebar-summary-key {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #94a3b8;
}

.public-sidebar-summary-row strong {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.public-summary-eyebrow {
    display: none;
}

.public-summary-title {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.public-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.public-summary-meta-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding-right: 14px;
    margin-right: 14px;
    line-height: 1.4;
}

.public-summary-meta-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    transform: translateY(-50%);
}

.public-summary-meta-label {
    display: inline;
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #94a3b8;
    white-space: nowrap;
}

.public-summary-meta-item strong {
    display: inline;
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
}

.public-thank-you {
    margin-bottom: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
    padding: 24px;
}

.public-thank-you-eyebrow {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: none;
    color: #1d4ed8;
}

.public-thank-you h2 {
    margin: 0 0 10px;
    color: #0f2f5b;
    font-size: 28px;
}

.public-thank-you-copy,
.public-thank-you-note {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

.public-thank-you-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0 14px;
}

.public-thank-you-item {
    position: relative;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
}

.public-copy-case-id-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.public-copy-case-id-btn svg {
    width: 15px;
    height: 15px;
}

.public-copy-case-id-btn:hover {
    background: #f1f5f9;
    color: #1f3b63;
}

.public-copy-case-id-btn.copied {
    color: #03b167;
}

.public-thank-you-item span {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: none;
    color: #64748b;
}

.public-thank-you-item strong {
    display: block;
    color: #1f2937;
    font-size: 15px;
}

.public-thank-you-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 18px;
}

#public-thank-you-go-site-btn,
#public-thank-you-new-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: #1f3b63;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

#public-thank-you-go-site-btn {
    border: 1px solid #c9daf7;
    background: #ffffff;
    color: #1f3b63;
}

form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0.01em;
    margin-bottom: 14px;
}

input,
select,
textarea {
    margin-top: 8px;
    width: 100%;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: #1f2937;
    background: #ffffff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #bfd0e4;
    background: #fcfdff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1d4e89;
    box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.12);
}

textarea {
    resize: vertical;
}

.grid {
    display: grid;
    gap: 14px;
    align-items: start;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.candidate-block {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 16px;
    background: #fbfdff;
}

.public-inline-note {
    font-size: 13px;
    line-height: 1.5;
    color: #475569;
}

.public-sidebar {
    position: sticky;
    top: 28px;
    flex: 0 0 200px;
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: flex-start;
}

.public-form-steps {
    position: relative;
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 4px 0 4px 4px;
    margin: 0;
}

.public-form-steps::before {
    content: '';
    position: absolute;
    left: 29px;
    top: 25px;
    bottom: 35px;
    width: 2px;
    height: auto;
    right: auto;
    background: #dbe4ef;
    z-index: 0;
}

.public-step-button {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    padding: 10px 10px 10px 4px;
    text-align: left;
    cursor: default;
    box-shadow: none;
    transition: background 0.15s;
    pointer-events: none;
}

.public-step-button:hover {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transform: none;
}

.public-step-button.is-active {
    color: #1f3b63;
    background: rgba(31, 95, 168, 0.05);
    box-shadow: none;
}

.public-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    border: 2px solid #dbe4ef;
    color: #94a3b8;
    font-size: 16px;
    font-weight: 800;
    flex: 0 0 42px;
}

.public-step-button.is-active .public-step-number {
    border-color: #1f5fa8;
    color: #1f5fa8;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 95, 168, 0.08);
}

.public-step-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    line-height: 1.3;
}

.public-step-button:disabled {
    opacity: 1;
    cursor: default;
}

.public-form-section {
    position: relative;
    margin: 18px 0 22px;
    border: 1px solid #d8e3f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.public-form-section-users {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-color: #cfe0f6;
}

.public-form-section-land-details {
    background: linear-gradient(180deg, #f7fcfb 0%, #ffffff 100%);
    border-color: #c6e7df;
}

.public-form-section-land-usage {
    background: linear-gradient(180deg, #fcf9ff 0%, #ffffff 100%);
    border-color: #ded4f7;
}

.public-form-section-dispute {
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    border-color: #d8e3f0;
}

.public-form-section-title {
    display: inline-flex;
    align-items: center;
    margin: 0 0 16px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
    font-size: 13px;
    font-weight: 800;
    color: #1f3b63;
    letter-spacing: 0.02em;
    text-transform: none;
}

.public-representative-list-section {
    margin-bottom: 14px;
}

.public-representative-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.public-representative-list-title {
    font-size: 12px;
    font-weight: 800;
    color: #1f3b63;
    letter-spacing: 0.02em;
    text-transform: none;
}

#public-clan-applicant-title {
    margin-bottom: 14px;
}

.public-representative-list-help {
    margin: 0 0 10px;
    font-size: 12px;
    color: #475569;
}

.public-field-help {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-transform: none;
    letter-spacing: normal;
}

.public-field-help-list {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    text-transform: none;
    letter-spacing: normal;
}

.public-field-help-list li {
    margin-bottom: 4px;
}

.public-choice-group {
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    padding: 14px;
}

.public-choice-group:has(.public-field-error-text) {
    padding-bottom: 18px;
}

.public-type-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.public-type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    text-align: center;
}

.public-type-tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #1f2937;
}

.public-type-tab.is-active {
    background: #ffffff;
    color: #1f3b63;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

/* Genealogy section — tabs + ancestral founder on one row */
.public-genealogy-top-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.public-lineage-type-field {
    flex: 1 1 0;
    min-width: 0;
}

.public-ancestral-founder-col {
    flex: 1 1 0;
    min-width: 0;
    margin-bottom: 0;
}

.public-lineage-type-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.01em;
    margin-bottom: 8px;
}

.public-lineage-tabs {
    margin-top: 0;
}

.public-lineage-tabs .public-type-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.public-lineage-tabs .public-type-tab svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.75;
}

.public-lineage-tabs .public-type-tab.is-active svg {
    opacity: 1;
}

/* Validation highlight on lineage tabs */
#public-lineage-tabs.is-invalid {
    outline: 2px solid #dc2626;
    border-radius: 10px;
    animation: publicInvalidPulse 0.4s ease;
}

.public-choice-group-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.public-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-top: 8px;
}

.public-boundary-method-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 12px;
}

.public-choice-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.7);
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: normal;
    text-transform: none;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.public-choice-item:hover {
    border-color: #d5dfec;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

.public-choice-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.public-choice-item input[type="radio"] {
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.public-choice-item span {
    line-height: 1.4;
}

.public-section-copy {
    margin: 0;
}

.public-choice-other-wrap {
    display: block;
    margin-top: 10px;
}

/* ── Land use type flat checkbox grid ── */
.public-land-use-field {
    margin-bottom: 16px;
}

.public-land-use-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f3b63;
    margin-bottom: 10px;
}

.public-land-use-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px 12px;
    margin-bottom: 8px;
}

.public-form-section .public-land-use-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    padding: 5px 6px;
    border-radius: 7px;
    margin-bottom: 0;
    position: static;
    transition: background 0.12s;
}

.public-form-section .public-land-use-check:hover {
    background: #f1f5f9;
}

.public-land-use-check input[type="checkbox"] {
    width: 15px;
    height: 15px;
    min-width: 15px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    border: 1.5px solid #c2d5ec;
    background: #fff;
    box-shadow: none;
    accent-color: #1f5fa8;
    cursor: pointer;
    flex: 0 0 15px;
}

.public-land-use-check input[type="checkbox"]:hover,
.public-land-use-check input[type="checkbox"]:focus {
    border-color: #1f5fa8;
    box-shadow: none;
    background: #fff;
    outline: none;
}

.public-land-use-other-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.public-land-use-other-input {
    flex: 1;
    min-width: 0;
}

.public-land-use-other-input input {
    margin-top: 0;
    width: 100%;
}

.public-multi-dropdown-field {
    margin-bottom: 0;
}

.public-multi-dropdown-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f3b63;
    margin-bottom: 6px;
}

.public-multi-dropdown {
    position: relative;
}

.public-multi-dropdown-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.public-multi-dropdown-summary::-webkit-details-marker {
    display: none;
}

.public-multi-dropdown-summary::after {
    content: 'v';
    font-size: 12px;
    color: #64748b;
}

.public-multi-dropdown[open] .public-multi-dropdown-summary {
    border-color: #1f3b63;
    box-shadow: 0 0 0 4px rgba(31, 59, 99, 0.08);
}

.public-multi-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
    padding: 8px;
}

.public-multi-dropdown-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 0;
}

.public-multi-dropdown-option:hover {
    background: #f8fbff;
}

.public-multi-dropdown-option input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.public-multi-dropdown-option span {
    color: #334155;
    font-size: 13px;
    font-weight: 600;
}

.public-guided-boundary-grid label {
    margin-bottom: 0;
}

.public-dispute-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-dispute-tabs {
    margin-bottom: 0;
}

.public-dispute-tabs .public-type-tab svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
}

.public-dispute-tabs .public-type-tab.is-active svg {
    opacity: 1;
}

.public-dispute-tab-description {
    margin-top: 10px;
    padding: 10px 13px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    min-height: 44px;
}

.public-dispute-tab-desc {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    line-height: 1.55;
}

.public-dispute-details {
    border-style: dashed;
    background: rgba(255, 255, 255, 0.86);
}

.public-boundary-description-wrap {
    margin-bottom: 12px;
}

.public-boundary-upload-wrap {
    margin-bottom: 12px;
}

.public-boundary-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.public-map-fallback {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.public-map-fallback input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.public-coordinate-summary {
    margin-top: 10px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f8fbff;
    color: #334155;
    font-size: 12px;
    line-height: 1.5;
    padding: 10px 12px;
    white-space: pre-wrap;
}

.public-representative-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.public-representative-item {
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    padding: 12px;
}

.public-representative-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.public-representative-item-label {
    font-size: 12px;
    font-weight: 700;
    color: #1f3b63;
}

.public-representative-remove {
    border-color: #f1c7c7;
    color: #b91c1c;
    background: #fff5f5;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.public-representative-remove svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.map-btn.public-representative-remove:hover:not(:disabled) {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12), 0 8px 18px rgba(239, 68, 68, 0.08);
    transform: translateY(-1px);
}

.public-clan-autocomplete {
    position: relative;
}

.public-clan-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 30;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.public-clan-suggestion {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    color: #1f2937;
    cursor: pointer;
    font: inherit;
    padding: 11px 13px;
    text-align: left;
}

.public-clan-suggestion:hover,
.public-clan-suggestion.is-active {
    background: #f8fbff;
}

.public-clan-suggestion:last-child {
    border-bottom: none;
}

.public-clan-suggestion small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.public-clan-selection-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: -4px 0 14px;
    max-width: calc(50% - 8px);
}

.public-clan-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fbff;
    color: #334155;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    box-sizing: border-box;
}

.public-clan-chip__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-clan-chip small {
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.public-clan-chip__remove {
    border: none;
    background: transparent;
    color: #b91c1c;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.public-clan-chip__remove:hover {
    opacity: 1;
}

.public-clan-chip__remove svg {
    width: 16px;
    height: 16px;
}

.tribe-other {
    margin-top: 12px;
    border-top: 1px dashed #dbe4ef;
    padding-top: 12px;
}

.public-map-section {
    border: 1px solid #d8e3f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    margin-bottom: 16px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.public-map-title {
    font-size: 12px;
    font-weight: 800;
    color: #1f3b63;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-bottom: 6px;
}

.public-map-subtitle {
    margin: 14px 0 8px;
    font-size: 12px;
    font-weight: 800;
    color: #1f3b63;
}

.public-map-subtitle--description {
    margin-top: 3px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.55;
}

.public-map-help {
    margin: 0 0 10px;
    font-size: 12px;
    color: #475569;
}

.public-boundary-mode-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.public-boundary-mode-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.public-boundary-mode-tab:hover {
    border-color: #bfd0e4;
    background: #f8fbff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

.public-boundary-mode-tab.is-active {
    border-color: #1f3b63;
    background: #eef5ff;
    box-shadow: 0 8px 18px rgba(31, 59, 99, 0.08);
}

.public-boundary-mode-tab input {
    width: 16px;
    height: 16px;
    margin: 0;
    flex: 0 0 auto;
}

/* ── New boundary definition tabs ── */
.public-boundary-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}

.public-boundary-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.public-boundary-tab svg {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
}

.public-boundary-tab:hover {
    background: rgba(255, 255, 255, 0.7);
    color: #1f2937;
}

.public-boundary-tab.is-active {
    background: #ffffff;
    color: #1f3b63;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
}

.public-boundary-tab--cannotmap.is-active {
    color: #be123c;
    background: #fff7f8;
    box-shadow: 0 1px 4px rgba(190, 18, 60, 0.1);
}

.public-boundary-cannotmap-notice {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff7f8;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    font-size: 13px;
    color: #9f1239;
}

.public-boundary-file-wrap {
    margin-bottom: 12px;
}

/* ── Representative selfie dropzone ── */
.public-rep-selfie-wrap {
    margin-top: 12px;
}

.public-rep-selfie-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.public-optional-tag {
    font-weight: 400;
    color: #94a3b8;
}

.rep-selfie-dropzone {
    margin-top: 0;
}

.rep-selfie-dropzone--hidden {
    display: none !important;
}

/* ── Boundary file compact dropzone ── */
.public-doc-dropzone {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 14px;
    border: 2px dashed #93b4d8;
    border-radius: 12px;
    background: linear-gradient(160deg, #eef4fb 0%, #f3f7fd 100%);
    color: #1f5fa8;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.15s, border-color 0.15s;
}

.public-doc-dropzone.is-dragging-over {
    background: #dbeafe;
    border-color: #1f5fa8;
}

.public-doc-dropzone-icon {
    width: 22px;
    height: 22px;
    color: #1f5fa8;
    flex: 0 0 auto;
}

.public-doc-dropzone-text {
    font-size: 13px;
    font-weight: 700;
    color: #1f3b63;
}

.public-doc-dropzone-or {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.public-doc-browse-btn {
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    color: #1f3b63;
    background: #ffffff;
    border: 1.5px solid #c2d5ec;
    border-radius: 7px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.public-doc-browse-btn:hover {
    border-color: #1f5fa8;
    box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.08);
}

.public-doc-dropzone-hint {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
}

/* ── Boundary file preview list ── */
.public-doc-file-preview-wrap {
    margin-top: 8px;
}

.public-doc-file-preview-count {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 6px;
}

.public-doc-file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.public-doc-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #dbe4ef;
    border-radius: 9px;
    background: #ffffff;
}

.public-doc-file-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #64748b;
}

.public-doc-file-name {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.public-doc-file-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
}

.public-map-search-inline {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: auto;
}

.public-map-search-inline input {
    width: 190px;
    height: 34px;
    margin: 0;
    padding-right: 36px;
    font-size: 13px;
    border-radius: 8px;
}

.public-map-search-icon-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-left: none;
    border-radius: 0 8px 8px 0;
    background: transparent;
    color: #64748b;
    box-shadow: none;
}

.public-map-search-icon-btn:hover {
    background: #f1f5f9;
    color: #1f3b63;
    border-left: none;
}

.public-map-search-inline .public-map-results {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    width: 300px;
    margin: 0;
    z-index: 200;
}

.map-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex: 0 0 auto;
}

.map-icon-btn svg {
    width: 16px;
    height: 16px;
}

.map-icon-btn:hover {
    background: #f1f5f9;
    border-color: #b6c8e0;
    color: #1f3b63;
}

.map-icon-btn.is-active {
    background: #eef5ff;
    border-color: #1f3b63;
    color: #1f3b63;
}

.public-map-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.public-map-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    padding: 10px;
}

.public-map-toolbar-group-actions {
    justify-content: flex-end;
    background: #f8fbff;
}

.public-map-toolbar-separator {
    width: 1px;
    height: 20px;
    background: #e2e8f0;
    flex: 0 0 auto;
    margin: 0 2px;
}

.public-map-toolbar select,
.public-map-toolbar input {
    margin-top: 0;
    width: auto;
}

.public-map-radius-wrap {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #64748b;
}

.public-map-radius-wrap input {
    width: 78px;
    padding: 7px 8px;
}

.public-map-canvas {
    height: 420px;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    background: #ffffff;
    margin-bottom: 10px;
}

.public-map-meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 7px;
}

.public-map-status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.public-map-actions {
    display: flex;
    gap: 6px;
}

.public-map-results {
    max-height: 180px;
    overflow-y: auto;
    font-size: 12px;
    color: #334155;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #ffffff;
    padding: 6px;
    margin: -2px 0 10px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.public-map-result-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 12px;
    color: #334155;
}

.public-map-result-btn:hover,
.public-map-result-btn.is-active {
    background: #eef5ff;
    color: #1f3b63;
}

.public-map-result-main {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-map-result-hint {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
}

.public-map-result-empty {
    padding: 8px 10px;
    color: #64748b;
}

.public-map-result-error {
    color: #b91c1c;
}

.map-btn {
    border: 1px solid #c9daf7;
    border-radius: 10px;
    background: #ffffff;
    color: #1f3b63;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.map-btn:hover:not(:disabled) {
    border-color: #97b3de;
    background: #f8fbff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.map-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.map-btn-magic {
    border-color: #a78bfa;
    background: #f5f3ff;
    color: #5b21b6;
}

.map-btn-primary {
    background: #1f3b63;
    border-color: #1f3b63;
    color: #ffffff;
}

.map-btn-primary:hover:not(:disabled) {
    background: #f0f6ff;
    border-color: #1f3b63;
    color: #1f3b63;
}

.actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.public-upload-section {
    border: 1px solid #d8e3f0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.public-upload-title {
    font-size: 12px;
    font-weight: 800;
    color: #1f3b63;
    letter-spacing: 0.02em;
    text-transform: none;
    margin-bottom: 6px;
}

.public-form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.public-upload-help {
    display: none;
}

/* ── Selfie drop zone ── */
.public-selfie-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 16px 8px;
    border: 2px dashed #93b4d8;
    border-radius: 12px;
    background: linear-gradient(160deg, #eef4fb 0%, #f3f7fd 100%);
    color: #1f5fa8;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.public-selfie-dropzone.is-dragging-over {
    background: #dbeafe;
    border-color: #1f5fa8;
}

.public-selfie-dropzone-icon {
    width: 28px;
    height: 28px;
    color: #1f5fa8;
    opacity: 0.8;
}

.public-selfie-dropzone-text {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #1f3b63;
}

.public-selfie-dropzone-or {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.public-selfie-browse-btn {
    padding: 7px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #1f3b63;
    background: #ffffff;
    border: 1.5px solid #c2d5ec;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.public-selfie-browse-btn:hover {
    border-color: #1f5fa8;
    box-shadow: 0 0 0 3px rgba(31, 95, 168, 0.08);
}

.public-selfie-dropzone-hint {
    margin: 2px 0 0;
    font-size: 11px;
    color: #94a3b8;
}

/* ── Selfie preview ── */
.public-selfie-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #f8fbff;
}

.public-selfie-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #dbe4ef;
    flex: 0 0 72px;
    background: #e2e8f0;
}

.public-selfie-preview-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.public-selfie-filename {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.public-selfie-preview-actions {
    display: flex;
    gap: 6px;
}

.public-selfie-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1.5px solid #dbe4ef;
    background: #ffffff;
    color: #475569;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    padding: 0;
}

.public-selfie-icon-btn svg {
    width: 16px;
    height: 16px;
}

.public-selfie-icon-btn:hover {
    border-color: #1f5fa8;
    color: #1f5fa8;
    background: #eef4fb;
}

.public-selfie-icon-btn--delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* old preview classes — kept for safety */
.public-photo-preview-wrap,
.public-photo-preview-header,
.public-photo-preview-actions,
.public-photo-preview-image { display: none; }

.public-doc-preview-wrap {
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}

.public-representative-item .public-doc-preview-wrap {
    margin-top: 10px;
}

.public-doc-preview-count {
    font-size: 12px;
    color: #475569;
    font-weight: 700;
    margin-bottom: 8px;
}

.public-doc-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.public-doc-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    background: #ffffff;
    cursor: default;
    text-align: left;
}

.public-doc-preview-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
}

.public-doc-preview-label {
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    word-break: break-word;
}

.public-doc-preview-open {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: #1f3b63;
}

.public-doc-preview-remove {
    border: 1px solid #f1c7c7;
    border-radius: 8px;
    background: #fff5f5;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.public-doc-preview-remove:hover {
    background: #fee2e2;
}

.public-doc-viewer-wrap {
    margin-top: 10px;
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.public-doc-viewer-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.public-doc-viewer-name {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    word-break: break-word;
}

.public-doc-viewer-meta {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.public-doc-viewer-link {
    font-size: 12px;
    font-weight: 700;
    color: #1f3b63;
    text-decoration: none;
    white-space: nowrap;
}

.public-doc-viewer-link:hover {
    text-decoration: underline;
}

.public-doc-viewer-content {
    min-height: 300px;
    background: #fff;
}

#public-submit-btn {
    border: none;
    border-radius: 12px;
    background: #1f3b63;
    color: #ffffff;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}

#public-map-draw-btn {
    background: #1f3b63;
    border-color: #1f3b63;
    color: #ffffff;
    padding: 8px 16px;
    font-size: 13px;
}

#public-map-draw-btn:hover:not(:disabled) {
    background: #03b167;
    border-color: #03b167;
    box-shadow: 0 10px 22px rgba(3, 177, 103, 0.22);
    transform: translateY(-1px);
}

#public-map-draw-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

#public-submit-btn:hover:not(:disabled) {
    background: #03b167;
    box-shadow: 0 10px 22px rgba(3, 177, 103, 0.22);
    transform: translateY(-1px);
}

#public-thank-you-new-btn:hover {
    background: #173150;
    box-shadow: 0 10px 22px rgba(31, 59, 99, 0.18);
    transform: translateY(-1px);
}

#public-thank-you-go-site-btn:hover {
    background: #f8fbff;
    border-color: #97b3de;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
    text-decoration: none;
}

#public-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 760px) {
    .public-portal-hero,
    .public-portal-section {
        padding: 24px 18px;
    }

    .public-portal-hero-topline {
        flex-direction: column;
        align-items: stretch;
    }

    .public-portal-account-actions {
        justify-content: flex-start;
    }

    .public-portal-account-actions .public-portal-secondary-action {
        width: auto;
    }

    .public-portal-hero-grid,
    .public-portal-process,
    .public-portal-section-heading,
    .public-portal-gallery,
    .public-portal-step-grid,
    .public-portal-checklist {
        grid-template-columns: 1fr;
    }

    .public-portal-status-card {
        margin-top: 4px;
    }

    .public-portal-submit-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .public-portal-submit-actions {
        justify-content: stretch;
    }

    .public-portal-primary-action,
    .public-portal-secondary-action {
        width: 100%;
    }

    .portal-shell {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .public-sidebar {
        position: static;
        flex: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
    }

    .public-sidebar-summary {
        display: none;
    }

    .public-form-steps {
        position: static;
        flex: none;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        padding: 6px 0 16px;
        margin-bottom: 4px;
        border-bottom: 1px solid #e2e8f0;
    }

    .public-form-steps::before {
        top: 23px;
        left: calc(100% / 6);
        right: calc(100% / 6);
        bottom: auto;
        height: 2px;
        width: auto;
    }

    .public-step-button {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 0 4px;
        text-align: center;
        background: transparent !important;
    }

    .public-step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
        flex: 0 0 36px;
    }

    .public-step-label {
        font-size: 10px;
    }

    .grid.two,
    .grid.three {
        grid-template-columns: 1fr;
    }

    .public-choice-grid {
        grid-template-columns: 1fr;
    }

    .public-boundary-method-grid {
        grid-template-columns: 1fr;
    }

    .public-boundary-mode-tabs {
        grid-template-columns: 1fr;
    }

    .public-boundary-tabs {
        flex-wrap: wrap;
    }

    .public-boundary-tab {
        flex: 1 1 40%;
    }

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

    .public-thank-you-summary {
        grid-template-columns: 1fr;
    }

    .public-map-status-row {
        flex-direction: column;
        align-items: stretch;
    }

    .public-map-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .public-map-toolbar-group,
    .public-map-toolbar-group-actions,
    .public-form-navigation {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ── Phone prefix picker ────────────────────────────────────── */
.public-form-section label,
.public-choice-group label {
    position: relative;
    margin-bottom: 14px;
}

label:has(#public-contact-name),
label:has(#public-phone-field),
label:has(#public-email) {
    display: flex;
    flex-direction: column;
}

label:has(#public-contact-name) #public-contact-name,
label:has(#public-email) #public-email {
    min-height: 46px;
}

label:has(#public-phone-field) .phone-field {
    height: 46px;
}

/* Contact grid: start-align so error text in one cell doesn't stretch siblings */
.public-choice-group:has(#public-contact-name) .grid {
    align-items: start;
}

.phone-field {
    position: relative;
    display: flex;
    align-items: stretch;
    margin-top: 8px;
    border: 1px solid #dbe4ef;
    border-radius: 12px;
    background: #ffffff;
    overflow: visible;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.phone-field:focus-within {
    border-color: #1d4e89;
    box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.12);
}

.phone-prefix-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    background: #f8fafc;
    border: none;
    border-right: 1px solid #dbe4ef;
    border-radius: 11px 0 0 11px;
    padding: 0 12px 0 14px;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
    line-height: 1;
    transition: background 0.15s ease;
    min-height: 46px;
}

.phone-prefix-btn:hover {
    background: #eef3fb;
}

.phone-prefix-btn:focus {
    outline: none;
}

.phone-prefix-btn[aria-expanded="true"] {
    background: #e2e8f0;
    border-color: #bfd0e4;
}

.phone-prefix-btn > img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

.phone-prefix-btn > span:nth-child(2) {
    font-size: 13px;
    font-weight: 700;
    color: #1d4e89;
}

.phone-caret {
    width: 9px;
    height: 5px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.18s ease;
}

.phone-prefix-btn[aria-expanded="true"] .phone-caret {
    transform: rotate(180deg);
}

.phone-field-divider {
    display: none;
}

/* Override global input styles for the tel input inside the picker */
.phone-field input[type="tel"] {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    margin-top: 0;
    border: none;
    border-radius: 0 11px 11px 0;
    background: transparent;
    box-shadow: none;
    padding: 12px 14px;
}

.phone-field input[type="tel"]:hover,
.phone-field input[type="tel"]:focus {
    border: none;
    box-shadow: none;
    background: transparent;
    outline: none;
}

/* Dropdown panel */
.phone-prefix-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.13), 0 2px 8px rgba(15, 23, 42, 0.06);
    min-width: 270px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.phone-prefix-dropdown[hidden] {
    display: none;
}

/* Search box inside dropdown */
.phone-prefix-search {
    margin: 10px 10px 6px;
    width: calc(100% - 20px);
    box-sizing: border-box;
    border: 1px solid #dbe4ef;
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    font-size: 13px;
    background: #f8fafc;
    color: #1f2937;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.phone-prefix-search:hover {
    border-color: #bfd0e4;
    background: #fcfdff;
}

.phone-prefix-search:focus {
    outline: none;
    border-color: #1d4e89;
    box-shadow: 0 0 0 2px rgba(29, 78, 137, 0.1);
    background: #fff;
}

/* Country list */
#public-phone-prefix-list,
.rep-phone-prefix-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 8px;
    overflow-y: auto;
    flex: 1;
}

#public-phone-prefix-list li,
.rep-phone-prefix-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #1f2937;
    transition: background 0.1s;
}

#public-phone-prefix-list li:hover,
#public-phone-prefix-list li.pfx-active,
#public-phone-prefix-list li:focus,
.rep-phone-prefix-list li:hover,
.rep-phone-prefix-list li.pfx-active,
.rep-phone-prefix-list li:focus {
    background: #eef4fb;
    outline: none;
}

#public-phone-prefix-list li .pfx-flag,
.rep-phone-prefix-list li .pfx-flag {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
}

#public-phone-prefix-list li .pfx-name,
.rep-phone-prefix-list li .pfx-name {
    flex: 1;
    font-weight: 500;
}

#public-phone-prefix-list li .pfx-code,
.rep-phone-prefix-list li .pfx-code {
    font-weight: 700;
    color: #1d4e89;
    font-size: 13px;
}

#public-phone-prefix-list .pfx-empty,
.rep-phone-prefix-list .pfx-empty {
    color: #94a3b8;
    padding: 12px 16px;
    font-size: 13px;
    cursor: default;
}

/* 4-column representative fields row: Role | Full name | Clan | Phone */
.public-rep-fields-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 2fr 2fr;
    gap: 12px;
    align-items: start;
}

.public-rep-fields-row label {
    margin-bottom: 0;
}

/* Strip the explicit min-height so the rep phone picker matches input/select height */
.rep-phone-field .phone-prefix-btn {
    min-height: 0;
}

@media (max-width: 900px) {
    .public-rep-fields-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* Customer sign-in (public portal) */
.portal-signin,
.portal-my-cases {
    background: #f8fafc;
    border: 1px solid #cbd5f5;
    border-radius: 18px;
    margin: 24px 34px 0;
    padding: 28px 30px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.portal-signin-title,
.portal-my-cases-title {
    margin: 0 0 6px;
    color: #0f2f5b;
    font-size: 22px;
    font-weight: 800;
}

.portal-signin-subtitle,
.portal-my-cases-meta {
    margin: 0 0 18px;
    color: #475569;
    font-size: 14px;
}

.portal-signin-label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.portal-signin-input {
    display: block;
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid #cbd5f5;
    border-radius: 12px;
    font-size: 16px;
    background: #ffffff;
    color: #0f172a;
}

.portal-signin-input:focus {
    outline: 2px solid #1d4e89;
    outline-offset: 1px;
}

.portal-signin-link {
    display: inline-block;
    margin-top: 12px;
    background: none;
    border: none;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
}

.portal-signin-link:hover {
    text-decoration: underline;
}

.portal-signin-hint {
    margin: 0 0 12px;
    color: #475569;
    font-size: 13px;
}

.portal-signin-error {
    margin: 16px 0 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
}

.portal-my-cases-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.portal-my-cases-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.portal-my-case {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.portal-my-case-title {
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.portal-my-case-id {
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.portal-my-case-meta {
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}

.portal-my-cases-empty {
    margin: 0;
    color: #475569;
    font-size: 14px;
}

#portal-signin-toggle {
    cursor: pointer;
    font-family: inherit;
}

.public-customer-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    font-size: 13px;
    font-weight: 600;
}

.public-customer-banner-link {
    color: #047857;
    text-decoration: underline;
    font-weight: 700;
}

