:root {
    --public-primary: #b91c1c;
    --public-primary-dark: #7f1d1d;
    --public-ink: #172033;
    --public-muted: #667085;
    --public-line: #e6e9ef;
    --public-bg: #f5f7fa;
}

.public-nav {
    background: rgba(127, 29, 29, .97);
    box-shadow: 0 8px 30px rgba(34, 10, 10, .18);
    padding: 12px 0;
    z-index: 1040;
}

.public-brand img {
    width: 118px;
    height: auto;
    filter: brightness(0) invert(1);
}

.public-complaint-page,
.public-success-page {
    min-height: 100vh;
    background: var(--public-bg);
    color: var(--public-ink);
}

.public-complaint-hero {
    padding: 125px 0 80px;
    color: #fff;
    background:
        radial-gradient(circle at 85% 10%, rgba(255,255,255,.16), transparent 28%),
        linear-gradient(135deg, #7f1d1d 0%, #b91c1c 58%, #dc2626 100%);
}

.public-kicker,
.success-kicker,
.complaint-form-heading span {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.public-complaint-hero h1 {
    max-width: 680px;
    margin: 12px 0 18px;
    font-size: clamp(2rem, 5vw, 3.45rem);
    font-weight: 700;
    line-height: 1.08;
}

.public-complaint-hero p {
    max-width: 700px;
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: 1.05rem;
    line-height: 1.8;
}

.privacy-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 18px;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(10px);
}

.privacy-card > i {
    font-size: 2rem;
}

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

.privacy-card span {
    margin-top: 4px;
    color: rgba(255,255,255,.8);
    font-size: .9rem;
}

.public-form-section {
    margin-top: -42px;
    padding-bottom: 90px;
}

.complaint-form-card,
.success-card {
    border: 1px solid var(--public-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(16, 24, 40, .1);
}

.complaint-form-card {
    padding: 34px;
}

.complaint-form-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--public-line);
}

.complaint-form-heading span {
    color: var(--public-primary);
}

.complaint-form-heading h2 {
    margin: 5px 0 0;
    font-weight: 700;
}

.step-badge {
    padding: 8px 13px;
    border-radius: 999px;
    color: var(--public-primary-dark);
    background: #fee2e2;
    font-size: .8rem;
    font-weight: 600;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 28px 0 18px;
}

.form-section-title > span {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    background: var(--public-primary);
    font-weight: 700;
}

.form-section-title strong,
.form-section-title small {
    display: block;
}

.form-section-title small {
    margin-top: 2px;
    color: var(--public-muted);
}

.complaint-form-card label {
    color: #344054;
    font-weight: 600;
}

.complaint-form-card label > span {
    color: var(--public-primary);
}

.complaint-form-card .form-control {
    min-height: 48px;
    border-color: #d7dce4;
    border-radius: 10px;
}

.complaint-form-card textarea.form-control {
    min-height: 145px;
}

.complaint-form-card .form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 .2rem rgba(185, 28, 28, .12);
}

.textarea-counter {
    margin-top: 5px;
    color: var(--public-muted);
    text-align: right;
    font-size: .78rem;
}

.photo-upload-box {
    margin-top: 26px;
    padding: 24px;
    border: 1px dashed #cbd2dc;
    border-radius: 16px;
    background: #fafbfc;
    text-align: center;
}

.photo-upload-copy {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    text-align: left;
}

.photo-upload-copy > i {
    color: var(--public-primary);
    font-size: 1.8rem;
}

.photo-upload-copy strong,
.photo-upload-copy span {
    display: block;
}

.photo-upload-copy span {
    color: var(--public-muted);
    font-size: .86rem;
}

.photo-preview-wrap {
    display: flex;
    width: 100%;
    min-height: 190px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    overflow: hidden;
    border-radius: 13px;
    background: #eef1f5;
}

.photo-preview-wrap img {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.photo-upload-box input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
}

.btn-camera,
.btn-submit-public {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.btn-camera {
    padding: 11px 18px;
    color: var(--public-primary-dark);
    background: #fee2e2;
}

.photo-upload-box small {
    display: block;
    margin-top: 9px;
    color: var(--public-muted);
}

.public-submit-row {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--public-line);
}

.public-consent {
    display: flex;
    max-width: 540px;
    gap: 9px;
    align-items: flex-start;
    color: var(--public-muted);
    font-size: .82rem;
}

.public-consent i {
    margin-top: 3px;
    color: #16a34a;
}

.btn-submit-public {
    min-width: 190px;
    padding: 13px 20px;
    color: #fff !important;
    background: var(--public-primary);
    box-shadow: 0 10px 24px rgba(185, 28, 28, .24);
    text-decoration: none !important;
}

.btn-submit-public:hover {
    color: #fff;
    background: var(--public-primary-dark);
    transform: translateY(-1px);
}

.btn-submit-public:disabled {
    cursor: wait;
    opacity: .75;
}

.loading-state {
    display: none;
}

.btn-submit-public.is-loading .normal-state {
    display: none;
}

.btn-submit-public.is-loading .loading-state {
    display: inline;
}

.public-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.public-success-page {
    display: flex;
    align-items: center;
    padding: 125px 0 80px;
}

.success-card {
    padding: 42px;
    text-align: center;
}

.success-icon {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    box-shadow: 0 16px 35px rgba(22, 163, 74, .25);
    font-size: 2rem;
}

.success-kicker {
    color: #15803d;
}

.success-card h1 {
    margin: 10px 0 14px;
    font-size: 2rem;
    font-weight: 700;
}

.success-card > p,
.success-card > small {
    color: var(--public-muted);
}

.report-code {
    margin: 25px 0;
    padding: 15px;
    border: 1px dashed #f87171;
    border-radius: 12px;
    color: var(--public-primary-dark);
    background: #fff7f7;
    font-family: monospace;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: .05em;
}

.notification-status {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 13px 16px;
    border-radius: 11px;
    font-size: .9rem;
}

.status-success {
    color: #166534;
    background: #dcfce7;
}

.status-warning {
    color: #854d0e;
    background: #fef9c3;
}

.success-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin: 28px 0 18px;
}

@media (max-width: 767.98px) {
    .public-complaint-hero {
        padding: 112px 0 68px;
    }

    .public-form-section {
        margin-top: -28px;
    }

    .complaint-form-card,
    .success-card {
        padding: 22px 18px;
        border-radius: 17px;
    }

    .complaint-form-heading,
    .public-submit-row,
    .success-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .step-badge {
        align-self: flex-start;
    }

    .btn-submit-public {
        width: 100%;
    }

    .photo-upload-copy {
        align-items: flex-start;
        justify-content: flex-start;
    }
}


/* ReportIT public complaint V2: group routing and share workflow */
.complaint-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 12px;
}

.complaint-type-card {
    position: relative;
    display: flex;
    min-height: 112px;
    gap: 14px;
    align-items: center;
    margin: 0;
    padding: 18px;
    overflow: hidden;
    border: 2px solid #d7dce4;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.complaint-type-card:hover {
    border-color: #f87171;
    transform: translateY(-1px);
}

.complaint-type-card.is-selected {
    border-color: var(--public-primary);
    background: #fff7f7;
    box-shadow: 0 0 0 4px rgba(185, 28, 28, .08);
}

.complaint-type-card input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.type-icon {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 13px;
    color: var(--public-primary-dark);
    background: #fee2e2;
    font-size: 1.25rem;
}

.type-copy {
    flex: 1;
}

.type-copy strong,
.type-copy small {
    display: block;
}

.type-copy small {
    margin-top: 5px;
    color: var(--public-muted);
    line-height: 1.45;
}

.type-check {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 50%;
    color: transparent;
    background: #eef1f5;
    font-size: .75rem;
}

.complaint-type-card.is-selected .type-check {
    color: #fff;
    background: var(--public-primary);
}

.success-card-wide {
    max-width: 850px;
    margin: 0 auto;
}

.report-preview-wrap {
    margin-top: 22px;
    text-align: left;
}

.report-preview-wrap label {
    color: #344054;
    font-weight: 700;
}

.report-preview {
    width: 100%;
    min-height: 330px;
    padding: 16px;
    border: 1px solid #d7dce4;
    border-radius: 13px;
    background: #f8fafc;
    color: #172033;
    font-family: monospace;
    line-height: 1.55;
    resize: vertical;
}

.copy-status {
    margin-top: 8px;
    color: var(--public-muted);
    font-size: .82rem;
}

.copy-status.is-success {
    color: #15803d;
}

.copy-status.is-warning {
    color: #b45309;
}

.photo-link-preview {
    display: inline-flex;
    align-items: center;
    margin-top: 16px;
    padding: 10px 15px;
    border-radius: 10px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 600;
    text-decoration: none;
}

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

.success-actions-grid .btn,
.success-actions-grid .btn-submit-public {
    width: 100%;
    min-height: 48px;
}

.success-secondary-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    margin: 4px 0 18px;
    font-size: .9rem;
}

@media (max-width: 767.98px) {
    .complaint-type-grid,
    .success-actions-grid {
        grid-template-columns: 1fr;
    }

    .complaint-type-card {
        min-height: 100px;
    }

    .report-preview {
        min-height: 390px;
    }
}
