:root {
    --bg: #fbfaf6;
    --surface: #ffffff;
    --surface-soft: #f4f0e7;
    --text: #26322c;
    --muted: #6b746f;
    --green: #2f6b54;
    --green-dark: #214b3d;
    --gold: #c7a15a;
    --gold-soft: #ead9b5;
    --danger: #a43b3b;
    --border: #e6dfd1;
    --shadow: 0 22px 70px rgba(38, 50, 44, .14);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
}

.hero__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 29, 25, .22), rgba(20, 29, 25, .68));
}

.topbar {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px clamp(18px, 5vw, 64px);
    gap: 14px;
}

.brand {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1;
}

.admin-link {
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 999px;
    font-size: .9rem;
    backdrop-filter: blur(10px);
}

.hero__content {
    position: relative;
    z-index: 1;
    width: min(760px, 100%);
    padding: 0 clamp(18px, 5vw, 64px) clamp(56px, 10vw, 100px);
}

.hero h1,
.thanks-card h1 {
    margin: 12px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 3.25rem;
    line-height: .96;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.hero p {
    max-width: 560px;
    font-size: 1.06rem;
    line-height: 1.55;
}

.eyebrow,
.section-kicker {
    display: inline-block;
    color: var(--gold);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    line-height: 1.4;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 20px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button--primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 14px 28px rgba(47, 107, 84, .25);
}

.button--primary:hover {
    background: var(--green-dark);
}

.button--ghost {
    min-height: 42px;
    margin-top: 10px;
    background: var(--surface-soft);
    color: var(--green-dark);
}

.button--full {
    width: 100%;
}

.section {
    width: min(1120px, calc(100% - 36px));
    margin: 0 auto;
    padding: 58px 0;
}

.intro {
    display: grid;
    gap: 22px;
}

.section h2,
.admin-header h1,
.admin-card h2 {
    margin: 8px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.intro p,
.empty,
.thanks-card p {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.8;
}

.goal-panel {
    padding: 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.goal-panel__header,
.admin-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.goal-panel__header strong {
    color: var(--green);
    font-size: 2rem;
    line-height: 1;
}

.progress {
    height: 14px;
    margin: 24px 0;
    overflow: hidden;
    background: var(--surface-soft);
    border-radius: 999px;
}

.progress span {
    display: block;
    height: 100%;
    min-width: 10px;
    background: linear-gradient(90deg, var(--green), var(--gold));
    border-radius: inherit;
}

.goal-grid,
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
    gap: 14px;
}

.goal-grid div,
.metric-grid article {
    padding: 18px;
    background: #fbfaf6;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.goal-grid span,
.metric-grid span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.goal-grid strong,
.metric-grid strong {
    display: block;
    margin-top: 8px;
    color: var(--green-dark);
    font-size: 1.45rem;
}

.section-heading {
    margin-bottom: 22px;
}

.catalog,
.message-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 16px;
}

.gift-card,
.message-card,
.thanks-card,
.login-card,
.admin-card,
.metric-grid article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(38, 50, 44, .08);
}

.gift-card {
    min-height: 168px;
    padding: 22px;
    text-align: left;
    color: var(--text);
    width: 100%;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.gift-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: var(--shadow);
}

.gift-card span {
    font-size: 2.25rem;
}

.gift-card strong {
    display: block;
    margin: 14px 0 8px;
    font-size: 1.12rem;
}

.gift-card small {
    color: var(--green);
    font-weight: 800;
}

.message-card {
    padding: 22px;
}

.message-card p {
    margin-top: 0;
    color: var(--muted);
    line-height: 1.65;
}

.message-card strong {
    color: var(--green-dark);
}

.footer {
    padding: 34px 18px;
    text-align: center;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: none;
}

.modal[aria-hidden="false"] {
    display: block;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 29, 25, .55);
}

.modal__box {
    position: relative;
    width: min(560px, calc(100% - 28px));
    max-height: calc(100dvh - 28px);
    margin: 14px auto;
    padding: 26px;
    overflow: auto;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.modal__box h2 {
    margin: 8px 38px 18px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
}

.modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 1.5rem;
}

.modal-open {
    overflow: hidden;
}

.contribution-form,
.admin-form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--green-dark);
    font-weight: 800;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 13px 14px;
    background: #fff;
    color: var(--text);
}

textarea {
    resize: vertical;
}

.pix-box {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 16px;
    background: #fbfaf6;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.pix-box img {
    width: 118px;
    height: 118px;
    border-radius: 8px;
}

.pix-box span,
.pix-box small {
    display: block;
    color: var(--muted);
}

.pix-box strong {
    display: block;
    overflow-wrap: anywhere;
    margin-top: 5px;
}

.thanks-page,
.admin-login {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.thanks,
.login-card {
    width: min(520px, 100%);
}

.thanks-card,
.login-card {
    margin-top: 18px;
    padding: 30px;
}

.thanks-card h1,
.login-card h1 {
    font-size: 2.25rem;
    line-height: 1.05;
}

.alert {
    padding: 13px 16px;
    border-radius: 8px;
    font-weight: 700;
}

.alert--error {
    background: #fae7e7;
    color: var(--danger);
}

.alert--success {
    background: #e4f1e9;
    color: var(--green-dark);
}

.admin-page {
    min-height: 100vh;
    background: #f7f4ed;
}

.admin-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px clamp(18px, 4vw, 34px);
    background: var(--green-dark);
    color: #fff;
}

.admin-nav .brand {
    font-size: 1.3rem;
}

.admin-nav nav {
    display: flex;
    flex: 1;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.admin-nav a,
.admin-nav button {
    white-space: nowrap;
    color: #fff;
}

.admin-nav nav a {
    padding: 9px 10px;
    border-radius: 8px;
}

.admin-nav nav a:hover {
    background: rgba(255, 255, 255, .12);
}

.admin-nav button {
    border: 0;
    background: transparent;
    font-weight: 800;
}

.admin-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.admin-header p {
    color: var(--muted);
}

.metric-grid {
    margin-bottom: 18px;
}

.admin-card {
    margin-top: 18px;
    padding: 22px;
    overflow: hidden;
}

.admin-card h2 {
    font-size: 1.8rem;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--green-dark);
    font-size: .85rem;
    text-transform: uppercase;
}

.message-cell {
    max-width: 320px;
    color: var(--muted);
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.status--aprovado {
    background: #e4f1e9;
    color: var(--green-dark);
}

.status--pendente {
    background: #fff2cb;
    color: #75581c;
}

.status--recusado {
    background: #fae7e7;
    color: var(--danger);
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-row button {
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--surface-soft);
    color: var(--green-dark);
    font-weight: 800;
}

.action-row .danger {
    color: var(--danger);
}

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

.span-2 {
    grid-column: 1 / -1;
}

@media (min-width: 780px) {
    .brand {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 5.75rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .section h2,
    .admin-header h1 {
        font-size: 3rem;
    }

    .goal-panel__header strong {
        font-size: 3.5rem;
    }

    .intro {
        grid-template-columns: .9fr 1.1fr;
        align-items: start;
    }

    .modal__box {
        margin-top: 5vh;
    }
}

@media (min-width: 1120px) {
    .hero h1 {
        font-size: 7rem;
    }

    .section h2,
    .admin-header h1 {
        font-size: 3.6rem;
    }

    .goal-panel__header strong {
        font-size: 4.5rem;
    }
}

@media (max-width: 900px) {
    .admin-nav {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .admin-nav nav {
        width: 100%;
        padding-bottom: 2px;
    }

    .admin-nav form {
        align-self: flex-end;
    }
}

@media (max-width: 720px) {
    .hero {
        min-height: 86dvh;
    }

    .topbar {
        padding: 16px;
    }

    .admin-link {
        padding: 9px 12px;
        font-size: .84rem;
    }

    .hero__content {
        padding: 0 16px 44px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .section {
        width: min(100% - 28px, 1120px);
        padding: 42px 0;
    }

    .section h2,
    .admin-header h1 {
        font-size: 1.9rem;
    }

    .goal-panel,
    .admin-card,
    .thanks-card,
    .login-card {
        padding: 20px;
    }

    .goal-panel__header,
    .admin-card__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .goal-panel__header strong {
        font-size: 2.4rem;
    }

    .pix-box,
    .form-grid,
    .admin-header {
        grid-template-columns: 1fr;
    }

    .admin-header {
        display: grid;
    }

    .modal__box {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        margin: 0;
        border-radius: 0;
        padding: 22px 16px;
    }

    .modal__box h2 {
        font-size: 1.7rem;
    }

    .pix-box {
        justify-items: center;
        text-align: center;
    }

    .pix-box strong {
        text-align: center;
    }

    table {
        min-width: 720px;
    }
}

@media (max-width: 420px) {
    .brand {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 2.65rem;
    }

    .hero p,
    .intro p,
    .empty,
    .thanks-card p {
        font-size: 1rem;
    }

    .gift-card {
        min-height: 140px;
        padding: 18px;
    }

    .button {
        width: 100%;
    }

    .topbar .button,
    .admin-link {
        width: auto;
    }

    .admin-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 24px;
    }

    .admin-nav {
        padding: 14px 12px;
    }

    .admin-nav nav {
        gap: 6px;
    }

    .admin-nav nav a {
        padding: 9px 8px;
        font-size: .9rem;
    }

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