* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #f8fafc;
}
.topbar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    padding: 24px 28px;
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}
.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: .8;
}
h1 {
    margin: 6px 0;
    font-size: 30px;
}
.subtitle {
    margin: 0;
    opacity: .85;
    max-width: 760px;
}
.container {
    padding: 24px;
    max-width: 1400px;
    margin: 0 auto;
}
.panel, .card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}
.controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
    padding: 18px;
    margin-bottom: 18px;
}
.field-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
}
label {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: .9;
}
select, input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    outline: none;
}
option { color: #111; }
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: bold;
    cursor: pointer;
}
.btn-primary {
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    color: white;
}
.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
}
.btn-locked {
    background: rgba(148, 163, 184, 0.4);
    color: white;
    cursor: not-allowed;
}
.top-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}
.stat-card {
    padding: 18px;
}
.stat-card span {
    display: block;
    opacity: .8;
    margin-bottom: 10px;
}
.stat-card strong {
    font-size: 28px;
}
.winner-panel {
    padding: 18px;
    margin-bottom: 20px;
}
.winner-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}
.winner-box {
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(90deg, rgba(34,197,94,.18), rgba(14,165,233,.18));
    border: 1px solid rgba(255,255,255,.1);
}
.winner-highlight {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 10px;
}
.winner-meta {
    opacity: .95;
    margin-top: 6px;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}
.slot {
    padding: 18px;
}
.slot-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.badge, .status {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
}
.badge {
    background: rgba(255,255,255,0.08);
}
.status-livre {
    background: rgba(34,197,94,.18);
    color: #86efac;
}
.status-ocupado {
    background: rgba(234,88,12,.18);
    color: #fdba74;
}
.slot h3 {
    margin: 6px 0 12px;
    font-size: 22px;
}
.slot small {
    display: block;
    margin-top: 10px;
    opacity: .72;
}
.ocupado {
    border-color: rgba(234,88,12,.3);
}
@media (max-width: 820px) {
    .topbar {
        flex-direction: column;
        align-items: stretch;
    }
    .stats {
        grid-template-columns: 1fr;
    }
}

.gift-panel {
    padding: 18px;
    margin-bottom: 18px;
}
.gift-grid {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 18px;
    align-items: start;
}
.gift-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 12px;
}
.gift-form label {
    display: block;
    margin-top: 12px;
}
.upload-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.upload-row input[type="file"] {
    display: none;
}
.helper-text {
    display: block;
    margin-top: 10px;
    opacity: .78;
}
.gift-preview-box {
    min-height: 100%;
}
.gift-status {
    margin-bottom: 12px;
    opacity: .88;
}
.gift-preview {
    min-height: 260px;
    border-radius: 16px;
    background: rgba(255,255,255,0.04);
    border: 1px dashed rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.gift-preview img {
    width: 100%;
    max-height: 360px;
    object-fit: contain;
    display: block;
}
.preview-placeholder {
    min-height: 260px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: .65;
    text-align: center;
    padding: 20px;
}
@media (max-width: 900px) {
    .gift-grid {
        grid-template-columns: 1fr;
    }
}


.btn-danger {
    background: linear-gradient(90deg, #dc2626, #ef4444);
    color: white;
}
.winner-list {
    display: grid;
    gap: 12px;
}
.winner-rank {
    font-size: 14px;
    font-weight: bold;
    opacity: .85;
    margin-bottom: 8px;
}
