:root {
    --ink: #1c2430;
    --muted: #5e6a78;
    --line: #e6e2d8;
    --paper: #f6f3ec;
    --card: #ffffff;
    --brand: #1d4e45;
    --brand-deep: #14362f;
    --copper: #b8613a;
    --shadow: 0 16px 40px rgba(28, 36, 48, 0.06);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 100% -10%, rgba(184, 97, 58, 0.08), transparent 60%),
        radial-gradient(700px 380px at -10% 0%, rgba(29, 78, 69, 0.08), transparent 55%),
        var(--paper);
    font-family: "Manrope", "Segoe UI", sans-serif;
}

h1, h2, h3, h4, .navbar-brand {
    font-family: "Fraunces", Georgia, serif;
    letter-spacing: -0.03em;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(246, 243, 236, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(28, 36, 48, 0.06);
}

.site-header .navbar {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.brand-logo {
    height: 3.75rem;
    width: auto;
    border-radius: 14px;
}

.navbar-nav .nav-link {
    color: var(--muted);
    font-weight: 650;
    border-radius: 999px;
    padding: 0.45rem 0.85rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--ink);
    background: rgba(29, 78, 69, 0.08);
}

.dropdown-menu {
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 0.4rem;
}

.dropdown-item {
    border-radius: 10px;
    font-weight: 600;
}

.site-main {
    flex: 1;
    padding: 2rem 0 3rem;
}

.site-footer {
    border-top: 1px solid rgba(28, 36, 48, 0.06);
    color: var(--muted);
    font-size: 0.95rem;
    padding: 1.25rem 0 1.6rem;
}

.site-footer a {
    color: var(--brand);
    font-weight: 750;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus {
    color: var(--copper);
    text-decoration: underline;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-head h1,
.page-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 2vw, 2.35rem);
}

.eyebrow {
    margin: 0 0 0.35rem;
    color: var(--copper);
    font-family: "Manrope", sans-serif;
    font-size: 0.78rem;
    font-weight: 760;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lede,
.page-head p,
.muted {
    color: var(--muted);
}

.panel,
.card {
    background: var(--card);
    border: 1px solid rgba(28, 36, 48, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.stat-card {
    height: 100%;
    padding: 1.25rem 1.3rem 1.15rem;
}

.stat-card .label {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.stat-card .value {
    margin: 0.35rem 0 0.2rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: 2.7rem;
    line-height: 1;
}

.stat-card .hint {
    color: var(--muted);
    font-size: 0.86rem;
}

.btn {
    border-radius: 999px;
    font-weight: 730;
    padding: 0.5rem 1rem;
}

.input-group > .btn {
    border-radius: 0;
}

.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.navbar-toggler {
    border-color: var(--line);
}

.table td .btn {
    margin: 0.12rem 0.12rem 0.12rem 0;
}

.btn-lg {
    padding: 0.75rem 1.25rem;
}

.btn-sm {
    padding: 0.28rem 0.7rem;
    font-size: 0.82rem;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-deep);
    border-color: var(--brand-deep);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: rgba(29, 78, 69, 0.35);
}

.btn-outline-primary:hover {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-success {
    background: #2f6f4e;
    border-color: #2f6f4e;
}

.btn-outline-secondary,
.btn-secondary {
    border-color: #d7d2c8;
}

.btn-secondary {
    background: #efece4;
    color: var(--ink);
}

.btn-secondary:hover {
    background: #e4dfd4;
    color: var(--ink);
}

.btn-outline-info {
    color: #1d4e45;
    border-color: rgba(29, 78, 69, 0.28);
}

.btn-outline-info:hover {
    background: #1d4e45;
    border-color: #1d4e45;
    color: #fff;
}

.form-control,
.form-select {
    border-radius: 12px;
    border-color: #ddd6c8;
    padding: 0.65rem 0.8rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #8eaea6;
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 69, 0.12);
}

.form-label {
    font-weight: 720;
    font-size: 0.92rem;
}

.alert {
    border: 0;
    border-radius: 14px;
}

.badge {
    border-radius: 999px;
    font-weight: 730;
    padding: 0.4em 0.7em;
}

.badge.bg-primary,
.bg-primary {
    background-color: var(--brand) !important;
}

.border-primary {
    border-color: var(--brand) !important;
}

.badge.bg-info {
    background-color: #3d6f8f !important;
}

.btn-info {
    background: #3d6f8f;
    border-color: #3d6f8f;
    color: #fff;
}

.btn-info:hover,
.btn-info:focus {
    background: #315a74;
    border-color: #315a74;
    color: #fff;
}

.data-table {
    min-width: 1080px;
}

#lista-envios {
    min-width: 760px;
}

.navbar-toggler {
    border-color: rgba(28, 36, 48, 0.16);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%231c2430' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 760;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom-color: var(--line);
}

.table td {
    vertical-align: middle;
}

.list-group-item {
    border-color: var(--line);
    padding-left: 0;
    padding-right: 0;
}

.hero {
    padding: 1.25rem 0 0.6rem;
}

.hero .eyebrow {
    margin-bottom: 0.85rem;
}

.hero h1 {
    font-size: clamp(2.15rem, 3.6vw, 3.35rem);
    line-height: 1.12;
    margin-bottom: 1.15rem;
    max-width: 14ch;
}

.hero .lead {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 34rem;
    margin-bottom: 1.6rem;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.75rem 0 0;
    padding: 0;
    list-style: none;
}

.hero-points li {
    color: var(--brand-deep);
    background: rgba(29, 78, 69, 0.08);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
}

.hero-visual {
    position: relative;
    width: min(100%, 420px);
    margin: 1.6rem 0.2rem 1rem auto;
}

.hero-visual img {
    display: block;
    width: 100%;
    height: 310px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 22px 46px rgba(28, 36, 48, 0.16);
}

.hero-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 16px -14px -16px 18px;
    border: 2px solid rgba(29, 78, 69, 0.45);
    border-radius: 30px;
}

.hero-chip {
    position: absolute;
    z-index: 1;
    margin: 0;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(28, 36, 48, 0.12);
}

.hero-chip-top {
    top: -14px;
    right: -8px;
    background: var(--brand);
    color: #f6f3ec;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-size: 0.92rem;
    font-weight: 800;
    animation: boiar 4.6s ease-in-out infinite;
}

.hero-chip-bottom {
    left: -16px;
    bottom: 18px;
    padding: 0.7rem 0.9rem 0.65rem;
    animation: boiar 5.4s ease-in-out infinite reverse;
}

.hero-chip-bottom span {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.hero-chip-bottom strong {
    color: var(--brand);
    font-size: 1.05rem;
}

.landing-types {
    margin: 4rem calc(50% - 50vw) 0;
    padding: 1rem 1.4rem;
    background: var(--brand);
    color: #f6f3ec;
    text-align: center;
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

.landing-block {
    margin-top: 4.5rem;
}

.landing-head {
    max-width: 36rem;
    margin-bottom: 1.85rem;
}

.landing-head .eyebrow {
    margin-bottom: 0.7rem;
}

.landing-head h2 {
    margin: 0;
    font-size: clamp(1.7rem, 2.5vw, 2.25rem);
    line-height: 1.2;
}

.feature-card,
.landing-steps li {
    height: 100%;
    border: 1px solid rgba(28, 36, 48, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.feature-card:hover,
.landing-steps li:hover {
    translate: 0 -8px;
    border-color: rgba(29, 78, 69, 0.28);
    box-shadow: 0 20px 40px rgba(28, 36, 48, 0.12);
}

.feature-card {
    padding: 1.45rem 1.35rem 1.35rem;
}

.feature-card strong {
    display: block;
    margin-bottom: 0.7rem;
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.28rem;
    font-weight: 560;
    line-height: 1.2;
}

.feature-card span {
    display: block;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.landing-steps {
    display: grid;
    gap: 1.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-steps li {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.3rem 1.3rem;
}

.landing-steps span {
    display: block;
    color: var(--copper);
    font-family: "Fraunces", Georgia, serif;
    font-size: 1.7rem;
    line-height: 1;
    margin-bottom: 0.85rem;
}

.landing-steps strong {
    display: block;
    margin: 0 0 0.55rem;
    font-size: 1.08rem;
    line-height: 1.3;
}

.landing-steps p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

.landing-cta {
    margin-top: 4.75rem;
    padding: 3rem 1.6rem;
    border-radius: 28px;
    background:
        radial-gradient(420px 180px at 100% 0%, rgba(255, 255, 255, 0.14), transparent 60%),
        var(--brand);
    color: #f6f3ec;
    text-align: center;
}

.landing-cta h2 {
    margin: 0 0 0.85rem;
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
    line-height: 1.2;
}

.landing-cta p {
    margin: 0 auto 1.5rem;
    max-width: 32rem;
    font-size: 1.05rem;
    line-height: 1.65;
}

@keyframes boiar {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes derivar {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@supports (animation-timeline: view()) {
    .hero-visual img {
        animation: foto-deriva linear both;
        animation-timeline: view();
        animation-range: cover 0% cover 100%;
    }

    .drift {
        animation: derivar linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 32%;
    }
}

@keyframes foto-deriva {
    from { transform: translateY(16px); }
    to { transform: translateY(-22px); }
}

@media (min-width: 768px) {
    .landing-steps {
        grid-template-columns: repeat(3, 1fr);
    }
}

.auth-wrap {
    max-width: 460px;
    margin: 0.5rem auto 0;
}

.auth-card,
.sheet {
    padding: 1.6rem 1.5rem 1.4rem;
}

.auth-logo {
    display: block;
    width: min(220px, 72%);
    height: auto;
    margin: 0 auto 1.1rem;
    border-radius: 20px;
}

.auth-card h1,
.sheet h1 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.party-cover {
    width: 100%;
    height: 168px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
    background: #e7efe9;
}

.party-cover-empty {
    background:
        radial-gradient(circle at 20% 20%, rgba(184, 97, 58, 0.18), transparent 40%),
        linear-gradient(160deg, #e7efe9, #f3efe6);
}

.party-card .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.party-card .action-row {
    margin-top: auto;
    padding-top: 0.8rem;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.meta-list {
    color: var(--muted);
    margin: 0;
}

.meta-list strong {
    color: var(--ink);
}

.status-link {
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.status-link:hover {
    transform: translateY(-2px);
}

.invite-sheet {
    overflow: hidden;
}

.invite-hero {
    background:
        radial-gradient(500px 180px at 100% 0%, rgba(184, 97, 58, 0.16), transparent 60%),
        linear-gradient(180deg, #fbfaf6, #fff);
}

.invite-photo {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 16px;
}

.filter-bar {
    padding: 0.9rem 1rem 0.2rem;
    margin-bottom: 1rem;
}

.empty-state {
    padding: 1.4rem 1.3rem;
}

.form-grid {
    display: grid;
    gap: 0 1rem;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid > .span-2,
    .form-grid > .mb-3:has(textarea),
    .form-grid > .mb-3:has(input[type="file"]),
    .form-grid > .mb-3:has(.form-check),
    .form-grid > .alert {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .page-head {
        align-items: stretch;
        flex-direction: column;
    }

    .site-main {
        padding-top: 1.25rem;
    }

    .hero h1 {
        font-size: 2.15rem;
        max-width: none;
    }

    .hero-visual {
        width: min(100%, 360px);
        margin: 1.75rem auto 0.4rem;
    }

    .hero-visual img {
        height: 260px;
    }

    .hero-chip-bottom {
        left: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-chip-top,
    .hero-chip-bottom,
    .hero-visual img,
    .drift,
    .feature-card,
    .landing-steps li {
        animation: none;
        transition: none;
    }
}
