*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 16px 60px;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    margin-bottom: 24px;
}

h1 { font-size: 1.75rem; color: #1a1a2e; margin-bottom: 8px; }
h2 { font-size: 1.2rem; color: #2c3e50; margin-bottom: 16px; }
h3 { font-size: 1rem; color: #555; margin-bottom: 12px; }

.event-meta { display: flex; flex-direction: column; gap: 8px; margin: 16px 0 24px; }
.event-meta span { display: flex; align-items: center; gap: 8px; font-size: .95rem; color: #555; }
.event-meta .icon { font-size: 1.1rem; }

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; }
.badge-orange { background: #fff3e0; color: #e65100; }
.badge-red    { background: #ffebee; color: #c62828; }

.progress-bar { background: #eee; border-radius: 20px; height: 8px; margin-bottom: 8px; }
.progress-fill { height: 8px; border-radius: 20px; background: #27ae60; transition: width .4s; }
.progress-fill.almost { background: #f39c12; }
.progress-fill.full   { background: #e74c3c; }
.progress-label { font-size: .82rem; color: #777; text-align: right; }

/* Form */
.form-group { margin-bottom: 18px; }
label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; color: #444; }
input[type="text"], input[type="email"], input[type="tel"] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color .2s;
}
input:focus { outline: none; border-color: #3498db; }
.input-error { border-color: #e74c3c !important; }
.error-msg { font-size: .82rem; color: #e74c3c; margin-top: 4px; }

.payment-options { display: flex; gap: 12px; flex-wrap: wrap; }
.payment-option {
    flex: 1;
    min-width: 140px;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    text-align: center;
    user-select: none;
}
.payment-option:hover   { border-color: #3498db; background: #f0f7ff; }
.payment-option.selected { border-color: #27ae60; background: #f0fff4; }
.payment-option .icon { font-size: 2rem; display: block; margin-bottom: 6px; }
.payment-option .label { font-weight: 600; font-size: .95rem; }
.payment-option .sublabel { font-size: .78rem; color: #777; margin-top: 2px; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: opacity .2s;
}
.btn:hover { opacity: .88; }
.btn-primary { background: #27ae60; color: #fff; }
.btn-secondary { background: #3498db; color: #fff; }
.btn-outline { background: transparent; border: 2px solid #ddd; color: #555; }

/* PIX */
.pix-box {
    background: #f8fffe;
    border: 2px dashed #27ae60;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}
.pix-box img { max-width: 220px; margin: 0 auto 16px; display: block; }
.pix-code {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px;
    font-family: monospace;
    font-size: .85rem;
    word-break: break-all;
    margin: 12px 0;
    text-align: left;
}
.copy-btn {
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: .9rem;
    margin-top: 8px;
}
.countdown { color: #e67e22; font-weight: 600; font-size: .9rem; margin-top: 12px; }
.spinner { border: 3px solid #eee; border-top-color: #27ae60; border-radius: 50%; width: 28px; height: 28px; animation: spin .8s linear infinite; margin: 12px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Success */
.success-icon { font-size: 4rem; text-align: center; margin-bottom: 16px; }
.info-grid { display: flex; flex-direction: column; gap: 10px; }
.info-row { display: flex; gap: 8px; align-items: flex-start; }
.info-row .icon { min-width: 20px; }

/* Admin table */
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; }
th { background: #f8f8f8; font-weight: 700; color: #555; }
tr:hover td { background: #fafafa; }
.status-confirmed { color: #27ae60; font-weight: 600; }
.status-pending   { color: #e67e22; font-weight: 600; }
.status-cancelled { color: #e74c3c; }

.stat-cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-card { flex: 1; min-width: 130px; background: #fff; border-radius: 10px; padding: 16px; text-align: center; box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.stat-card .num { font-size: 2rem; font-weight: 700; color: #2c3e50; }
.stat-card .lbl { font-size: .8rem; color: #888; margin-top: 4px; }

/* ── Event Info Card (image + details combined) ────────── */
.event-info-card { padding: 0; overflow: hidden; }
/* Arte no formato de post do Instagram (4:5 — 1080x1350) */
.event-info-card .event-image-top {
    aspect-ratio: 4 / 5;
    max-height: 70vh;
    overflow: hidden;
    background: #e8e8e8;
}
.event-info-card .event-image-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.event-info-card .event-image-top.no-image {
    display: none;
}
.event-info-body { padding: 22px 28px 24px; }
.event-info-body .badge { margin-bottom: 10px; }
.event-info-body h1 { color: #1a1a2e; font-size: 1.75rem; margin-bottom: 14px; }
.event-hero-meta {
    display: flex; flex-direction: column; gap: 8px;
    font-size: .95rem; color: #555;
}
.event-hero-meta span { display: flex; align-items: center; gap: 8px; }

/* ── Ticket Summary Card ───────────────────────────────── */
.ticket-card {
    border-left: 5px solid #27ae60;
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ticket-card-left {}
.ticket-type { font-size: .75rem; font-weight: 700; color: #27ae60; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.ticket-price { font-size: 2rem; font-weight: 800; color: #1a1a2e; line-height: 1.1; }
.ticket-installment { font-size: .82rem; color: #888; margin-top: 2px; }
.ticket-card-right { text-align: right; }
.ticket-spots { font-size: .85rem; color: #888; }
.ticket-spots strong { color: #1a1a2e; }

/* ── Registration Form Card ────────────────────────────── */
.form-card h2 { font-size: 1rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #eee; }

/* ── Quantity Block ────────────────────────────────────── */
.qty-block {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    text-align: center;
}
.qty-block-label { font-size: .78rem; font-weight: 700; color: #999; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.qty-block-row { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 12px; }
.qty-btn-lg {
    width: 48px; height: 48px;
    border-radius: 50%;
    border: 2px solid #27ae60; background: #fff; color: #27ae60;
    font-size: 1.6rem; font-weight: 700; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background .15s, color .15s;
}
.qty-btn-lg:hover:not(:disabled) { background: #27ae60; color: #fff; }
.qty-btn-lg:disabled { border-color: #ddd; color: #ccc; cursor: not-allowed; }
.qty-value-lg { font-size: 2.2rem; font-weight: 800; min-width: 56px; text-align: center; color: #1a1a2e; }
.qty-total { font-size: .9rem; color: #888; }
.qty-total strong { font-size: 1.3rem; color: #1a1a2e; font-weight: 800; }

/* legacy - unused but keep to avoid breaking other refs */
.qty-row { display: flex; align-items: center; gap: 0; margin-bottom: 16px; }
.qty-btn { width: 38px; height: 38px; border: 2px solid #ddd; background: #fff; color: #333; font-size: 1.3rem; font-weight: 700; cursor: pointer; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.qty-value { font-size: 1.3rem; font-weight: 700; min-width: 52px; text-align: center; }
.qty-total-inline { margin-left: auto; font-size: 1rem; color: #555; }
.qty-total-inline strong { font-size: 1.4rem; color: #1a1a2e; font-weight: 800; }

/* ── Events Hub ───────────────────────────────────────── */
.hub-container { max-width: 860px; margin: 0 auto; padding: 0 16px 60px; }
.hub-header { padding: 36px 0 28px; }
.hub-header h1 { font-size: 2rem; color: #1a1a2e; margin-bottom: 6px; }
.hub-header p  { color: #777; font-size: .97rem; }

.hub-section { margin-bottom: 40px; }
.hub-section-title {
    font-size: .75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .1em; color: #999; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 2px solid #f0f0f0;
}
.hub-section-title.open    { color: #27ae60; border-color: #c8f0d8; }
.hub-section-title.soon    { color: #3498db; border-color: #cce4f7; }
.hub-section-title.past    { color: #aaa;    border-color: #eee; }

.event-cards { display: flex; flex-direction: column; gap: 16px; }

.event-card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    overflow: hidden; display: flex; flex-direction: row;
    text-decoration: none; color: inherit;
    transition: transform .18s, box-shadow .18s;
}
.event-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(0,0,0,.11); }
.event-card.past  { opacity: .7; }

.event-card-thumb {
    width: 132px; aspect-ratio: 4 / 5; flex-shrink: 0;
    background: #e8e8e8; overflow: hidden;
}
.event-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card-thumb-placeholder {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem;
}

.event-card-body { flex: 1; padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.event-card-name { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; line-height: 1.3; }
.event-card-meta { font-size: .85rem; color: #777; display: flex; flex-direction: column; gap: 2px; }
.event-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; flex-wrap: wrap; gap: 8px; }
.event-card-price { font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.event-card-price small { font-size: .78rem; font-weight: 400; color: #888; display: block; }

@media (max-width: 500px) {
    .event-card-thumb { width: 96px; }
    .event-card-body { padding: 12px 14px; }
    .hub-header h1 { font-size: 1.5rem; }
}

/* ── Admin events page ─────────────────────────────────── */
.event-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #eee; gap: 12px; flex-wrap: wrap; }
.event-row:last-child { border-bottom: none; }
.event-row-info { flex: 1; min-width: 0; }
.event-row-info strong { display: block; font-size: .97rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-row-info small { color: #888; font-size: .82rem; }
.event-row-actions { display: flex; gap: 8px; flex-shrink: 0; }

textarea {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #ddd; border-radius: 8px;
    font-size: .95rem; font-family: inherit;
    resize: vertical; min-height: 90px; transition: border-color .2s;
}
textarea:focus { outline: none; border-color: #3498db; }
select {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid #ddd; border-radius: 8px;
    font-size: 1rem; background: #fff; transition: border-color .2s;
}
select:focus { outline: none; border-color: #3498db; }

@media (max-width: 500px) {
    .card { padding: 20px; }
    h1 { font-size: 1.4rem; }
    .payment-options { flex-direction: column; }
    .event-hero { height: 220px; }
    .event-hero h1 { font-size: 1.3rem; }
}
