/* ==========================================
   RESET E VARIÁVEIS
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --success-hover: #059669;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* ==========================================
   CONTAINER E LAYOUT
   ========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   HEADER DO SITE PÚBLICO
   ========================================== */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.nav-brand p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu a:hover {
    opacity: 0.8;
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* ==========================================
   FILTROS
   ========================================== */
.filters-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
}

.filters-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
}

/* ==========================================
   LISTAGEM DE ANÚNCIOS
   ========================================== */
.listings-section {
    margin-bottom: 3rem;
}

.listings-section h3 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.listing-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.listing-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.no-image-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.listing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
}

.listing-content {
    padding: 1.5rem;
}

.listing-content h4 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.listing-description {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.listing-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.info-item .icon {
    font-size: 1.2rem;
}

.listing-price {
    margin-bottom: 1.5rem;
}

.price-main {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.price-per-person {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ==========================================
   PÁGINA DE DETALHES
   ========================================== */
.details-page {
    margin: 2rem 0;
}

.details-header {
    margin-bottom: 2rem;
}

.details-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.details-title h1 {
    font-size: 2.5rem;
}

.category-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
}

.details-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.details-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.details-image {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
}

.no-image-large span {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.details-description,
.details-features {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.details-description h2,
.details-features h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.feature-icon {
    font-size: 2rem;
}

.feature-info strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

.feature-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================
   CARD DE RESERVA
   ========================================== */
.booking-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.booking-price {
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.price-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.price-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.booking-info {
    margin-bottom: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.booking-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.booking-note {
    margin-top: 1rem;
    padding: 1rem;
    background: #fef3c7;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #92400e;
}

/* ==========================================
   ESTADO VAZIO
   ========================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
}

.empty-state a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* ==========================================
   FOOTER
   ========================================== */
.site-footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* ==========================================
   PÁGINA DE LOGIN
   ========================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-box {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ==========================================
   PAINEL ADMINISTRATIVO
   ========================================== */
.admin-header {
    background: var(--text-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav .nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-nav .nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.admin-nav .nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav .nav-menu a i {
    font-size: 1.1rem;
}

.admin-nav .nav-menu a:hover {
    opacity: 0.8;
}

.logout-link {
    color: var(--danger-color) !important;
}

/* ==========================================
   DASHBOARD
   ========================================== */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
}

/* ==========================================
   TABELA ADMIN
   ========================================== */
.table-responsive {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

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

.admin-table thead {
    background: var(--bg-color);
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tbody tr:hover {
    background: var(--bg-color);
}

.table-img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.no-image {
    width: 80px;
    height: 60px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.actions {
    display: flex;
    gap: 0.5rem;
}

.text-center {
    text-align: center;
}

/* ==========================================
   FORMULÁRIOS
   ========================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
}

.form-container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.current-image {
    margin-top: 0.5rem;
}

.current-image img {
    max-width: 300px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ==========================================
   ALERTAS
   ========================================== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

/* ==========================================
   BOTÕES
   ========================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: var(--success-hover);
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

.btn-delete:hover {
    background: var(--danger-hover);
}

.btn-edit {
    background: var(--warning-color);
    color: white;
}

.btn-edit:hover {
    background: #d97706;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .filters-form {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .listings-grid {
        grid-template-columns: 1fr;
    }
    
    .details-content {
        grid-template-columns: 1fr;
    }
    
    .details-image {
        height: 300px;
    }
    
    .details-title h1 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .booking-card {
        position: static;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-responsive {
        overflow-x: scroll;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 2rem 1.5rem;
    }
    
    .details-title {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================
   LOGO E FAVICON
   ========================================== */

/* Logo no header público */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand .logo {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1); /* Torna o logo branco */
}

.nav-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.nav-brand .brand-text h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
}

.nav-brand .brand-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Logo na página de login */
.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 80px;
    width: auto;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.login-header .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Logo no header admin */
.admin-logo {
    height: 35px;
    width: auto;
    vertical-align: middle;
    margin-right: 0.5rem;
    filter: brightness(0) invert(1); /* Torna o logo branco */
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

/* Ajustes responsivos para logo */
@media (max-width: 768px) {
    .nav-brand .logo {
        height: 40px;
    }
    
    .nav-brand .brand-text h1 {
        font-size: 1.4rem;
    }
    
    .login-logo {
        height: 60px;
    }
    
    .admin-logo {
        height: 30px;
    }
}

/* ==========================================
   AÇÕES RÁPIDAS (DASHBOARD)
   ========================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
}

.action-btn:hover {
    border-color: var(--primary-color);
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 2rem;
}

.action-text {
    font-weight: 600;
    font-size: 1rem;
}
