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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1a365d;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon { font-size: 28px; }
.logo-text { font-size: 18px; font-weight: 700; }

.nav { flex: 1; padding: 16px 0; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
    position: relative;
}

.nav-item:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-item.active { background: rgba(255,255,255,0.15); color: white; border-left: 3px solid #48bb78; }

.nav-icon { font-size: 20px; width: 24px; text-align: center; }

.badge {
    background: #e53e3e;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.btn-logout {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 12px;
    width: 100%;
}

.btn-logout:hover { background: rgba(255,255,255,0.2); }

/* Main */
.main { flex: 1; margin-left: 260px; padding: 24px 32px; }

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.header h1 { font-size: 28px; font-weight: 700; color: #1a365d; }

.config-badge {
    background: #edf2f7;
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-right: 12px;
}

/* Sections */
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.card-icon { font-size: 32px; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #ebf8ff; }

.card-blue .card-icon { background: #ebf8ff; }
.card-green .card-icon { background: #f0fff4; }
.card-orange .card-icon { background: #fffaf0; }
.card-purple .card-icon { background: #faf5ff; }
.card-gold .card-icon { background: #fffbeb; }
.card-silver .card-icon { background: #f7fafc; }
.card-bronze .card-icon { background: #fff7ed; }

.card-info h3 { font-size: 28px; font-weight: 700; color: #1a365d; margin-bottom: 4px; }
.card-info p { font-size: 14px; color: #718096; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.panel {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.panel h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-x: auto;
}

.table { width: 100%; border-collapse: collapse; }

.table th {
    background: #f7fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
    white-space: nowrap;
}

.table tr:hover { background: #f7fafc; }
.table .empty { text-align: center; color: #a0aec0; padding: 40px; }

/* Status */
.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pendente { background: #fef3c7; color: #92400e; }
.status-aprovada { background: #d1fae5; color: #065f46; }
.status-hospedado { background: #dbeafe; color: #1e40af; }
.status-recusada { background: #fee2e2; color: #991b1b; }
.status-cancelada { background: #e5e7eb; color: #374151; }
.status-concluida { background: #e0e7ff; color: #3730a3; }
.status-ativo { background: #d1fae5; color: #065f46; }
.status-utilizado { background: #e5e7eb; color: #374151; }
.status-expirado { background: #fee2e2; color: #991b1b; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: #3182ce; color: white; }
.btn-primary:hover { background: #2c5282; }

.btn-success { background: #48bb78; color: white; }
.btn-success:hover { background: #38a169; }

.btn-danger { background: #e53e3e; color: white; }
.btn-danger:hover { background: #c53030; }

.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e0;
    color: #4a5568;
}
.btn-outline:hover { background: #f7fafc; }

.btn-whatsapp { background: #25d366; color: white; }
.btn-whatsapp:hover { background: #1ebe5d; }

.btn-warning { background: #ed8936; color: white; }
.btn-warning:hover { background: #c05621; }

.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Pagamentos */
.pagamentos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.pagamentos-totais {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f7fafc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
}

.pag-total-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 6px 0;
    border-bottom: 1px solid #e2e8f0;
}

.pag-total-item:last-child { border-bottom: none; }
.pag-total-item span { color: #718096; }
.pag-total-item strong { font-size: 16px; }

@media (max-width: 600px) {
    .pagamentos-grid { grid-template-columns: 1fr; }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-bar input,
.filter-bar select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.filter-bar input:focus,
.filter-bar select:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input,
.form-group select {
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; animation: fadeIn 0.2s; }

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 28px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s;
}

.modal-large { max-width: 700px; }

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #a0aec0;
}
.close:hover { color: #2d3748; }

/* Lists */
.lista-reservas, .lista-clientes, .lista-sorteios, .lista-vouchers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-lista {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: #f7fafc;
    border-radius: 8px;
    transition: background 0.2s;
}

.item-lista:hover { background: #edf2f7; }

.item-info h4 { font-size: 14px; font-weight: 600; color: #2d3748; }
.item-info p { font-size: 12px; color: #718096; margin-top: 2px; }

/* Regras Fidelização */
.regras-fidelidade { display: flex; flex-direction: column; gap: 16px; }

.regra-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 12px;
    align-items: flex-start;
}

.regra-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 12px;
    flex-shrink: 0;
}

.regra-item h4 { font-size: 16px; font-weight: 600; color: #2d3748; margin-bottom: 4px; }
.regra-item p { font-size: 14px; color: #718096; }

/* Níveis */
.nivel-ouro { color: #d69e2e; font-weight: 700; }
.nivel-prata { color: #718096; font-weight: 600; }
.nivel-bronze { color: #c05621; font-weight: 600; }
.nivel-visitante { color: #a0aec0; }

/* Relatórios */
.relatorio-dados { max-height: 400px; overflow-y: auto; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; height: auto; }
    .main { margin-left: 0; }
    .app { flex-direction: column; }
    .cards-grid { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading { animation: pulse 1.5s infinite; }
