/* ============================================
   OEIRASPRIME — style.css
   Versão limpa e organizada
   ============================================ */

/* ── 1. RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #111;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: url("/Imagens/Site/background.png") no-repeat center center fixed;
  background-size: cover;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.75), rgba(245,238,225,0.9));
  z-index: -1;
}

main { flex: 1 0 auto; }
.has-fixed-nav { padding-top: 90px; }

/* ── 2. NAVBAR ── */
.navbar {
  background: linear-gradient(to right, #ffffff, #f1ead6) !important;
  border-bottom: 1px solid rgba(212,175,55,0.4);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.navbar-brand { color: #b9962c !important; font-weight: 800; letter-spacing: 0.4px; }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

.btn-inbox-container,
.navbar-toggler-custom {
  color: #b9962c;
  background: transparent;
  border: 1px solid rgba(185,150,44,0.3);
  border-radius: 8px;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; padding: 0;
  transition: all 0.3s ease;
}

.btn-inbox-container { font-size: 1.3rem; }

.btn-inbox-container:hover,
.navbar-toggler-custom:hover {
  background: #b9962c; color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(185,150,44,0.2);
}

.navbar-toggler-icon { filter: sepia(1) saturate(5) hue-rotate(10deg); width: 1.2em; height: 1.2em; }

#userProfile {
  display: none; align-items: center;
  padding: 4px 12px 4px 6px;
  border: 1px solid rgba(185,150,44,0.3);
  border-radius: 50px; background: transparent; cursor: pointer;
  transition: all 0.3s ease;
}

#userProfile:hover { background: rgba(185,150,44,0.08); border-color: #b9962c; transform: translateY(-2px); }
#userAvatar { border: 1px solid #b9962c; object-fit: cover; }
#userName { font-weight: 600; color: #111; font-size: 0.95rem; }

/* ── 3. OFFCANVAS ── */
.offcanvas { background: linear-gradient(rgba(255,255,255,0.97), rgba(248,243,230,0.98)) !important; }
.offcanvas-title { color: #b9962c; font-weight: 800; }
.offcanvas .nav-link { color: #111 !important; font-weight: 600; transition: color 0.3s; }
.offcanvas .nav-link:hover, .nav-link.active { color: #b9962c !important; }
.nav-link.active { font-weight: 700; }

/* ── 4. TIPOGRAFIA ── */
h1, h2, h3, h4, h5 { color: #b9962c; }

/* ── 5. HERO ── */
.hero { padding: 80px 20px; }
.hero .container {
  background: linear-gradient(rgba(255,255,255,0.95), rgba(248,243,230,0.96)) !important;
  border-radius: 22px; padding: 60px;
  border: 1px solid rgba(212,175,55,0.35) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,0.18) !important;
}
.page-header { text-align: center; background: transparent !important; border: none !important; box-shadow: none !important; }

/* ── 6. CARDS ── */
.card {
  background: linear-gradient(rgba(255,255,255,0.94), rgba(248,243,230,0.96));
  border-radius: 18px; border: 1px solid rgba(212,175,55,0.3);
  box-shadow: 0 15px 40px rgba(0,0,0,0.18);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

main > .container, section.container { background: transparent !important; border: none !important; box-shadow: none !important; }

.service-card {
  background: linear-gradient(rgba(255,255,255,0.96), rgba(248,243,230,0.98)) !important;
  border-radius: 20px; border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 18px 40px rgba(0,0,0,0.15) !important; padding: 35px; transition: all 0.35s ease;
}
.service-card h4 { color: #b9962c; margin-bottom: 1rem; }
.service-card p  { text-align: justify; hyphens: auto; color: #444; }
.service-card:hover { transform: translateY(-10px); box-shadow: 0 28px 60px rgba(0,0,0,0.22) !important; }

.highlight-container { background: #fdfbf7; border: 1px solid rgba(185,150,44,0.2); border-radius: 15px; padding: 3rem 2rem; }

/* ── 7. CARDS DE IMÓVEIS ── */
.property-card .card { border: none; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; }
.property-card:hover .card { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }
.card-img-fixed { height: 240px; width: 100%; object-fit: cover; transition: transform 0.5s ease; }
.property-card:hover .card-img-fixed { transform: scale(1.05); }
.price-tag { color: #c5a059; font-size: 1.25rem; font-weight: 700; }
.text-gold { color: #b9962c; }

/* ── 8. BOTÕES ── */
.btn { transition: all 0.3s ease !important; cursor: pointer; }
.btn-primary, .btn-warning, .hero-btn {
  background: linear-gradient(135deg, #d4af37, #b9962c) !important;
  border: none !important; color: #000 !important; font-weight: 700 !important; border-radius: 10px;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); filter: brightness(1.05); }

.btn-view-details {
  background: #c5a059; border: none; color: #fff; padding: 10px; border-radius: 6px;
  font-weight: 500; transition: background 0.3s; text-align: center; text-decoration: none; display: block;
}
.btn-view-details:hover { background: #a68648; color: #fff; }

.btn-oeiras-filter {
  background: #fff; color: #c5a059; border: 1px solid #c5a059; padding: 10px 24px;
  border-radius: 8px; display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; cursor: pointer; transition: all 0.3s ease;
}
.btn-oeiras-filter:hover { background: #c5a059; color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(197,160,89,0.2); }

.btn-upload-custom {
  background: linear-gradient(135deg, #d4af37, #b9962c); color: #000 !important; border: none;
  padding: 10px 22px; border-radius: 8px; font-size: 0.75rem; font-weight: 800;
  text-transform: uppercase; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(185,150,44,0.25);
}
.btn-upload-custom:hover { transform: translateY(-2px); filter: brightness(1.1); }

#logoutBtn { margin-top: 1rem; border-radius: 10px; padding: 12px; transition: all 0.3s ease; }
#logoutBtn:hover { background: #dc3545; color: #fff; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(220,53,69,0.2); }

/* ── 9. INPUTS ── */
textarea, input, select {
  background: #fff !important; border: 1px solid rgba(212,175,55,0.5) !important;
  color: #111 !important; transition: all 0.3s ease !important;
}
textarea:focus, input:focus, select:focus {
  transform: translateY(-2px); box-shadow: 0 6px 15px rgba(212,175,55,0.2) !important;
  border-color: #b9962c !important; outline: none;
}
.filter-card { background: #fff; border: none; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }

/* ── 10. FOOTER ── */
footer {
  flex-shrink: 0; background: rgba(255,255,255,0.95);
  border-top: 1px solid rgba(212,175,55,0.4); color: #b08a14;
  text-align: center; padding: 20px 0; width: 100%;
}

/* ── 11. ALERTAS ── */
@keyframes fadeInDown {
  from { opacity: 0; transform: translate(-50%, -20px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.alert { animation: fadeInDown 0.4s ease-out; border-radius: 12px; border: 1px solid rgba(212,175,55,0.2); }

#account-status, #statusAlert {
  position: fixed; top: 100px; left: 50%; transform: translateX(-50%);
  z-index: 9999; min-width: 320px; pointer-events: none;
}
#account-status .alert, #statusAlert { pointer-events: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.15); border-radius: 12px; }
#account-status .alert-success { background: #28a745 !important; color: #fff !important; border: 1px solid #1e7e34; }

/* ── 12. PERFIL / AVATAR ── */
.avatar-wrapper { position: relative; display: inline-block; transition: transform 0.3s ease; }
.avatar-wrapper:hover { transform: scale(1.02); }
#profilePreview { width: 140px; height: 140px; object-fit: cover; border: 3px solid #b9962c !important; border-radius: 50%; background: #f8f9fa; box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
#profileForm .form-label, #passwordForm .form-label { font-weight: 600; color: #444; font-size: 0.9rem; margin-bottom: 0.4rem; }

/* ── 13. INBOX ── */
.filter-bar { display: flex; gap: 10px; margin-bottom: 2rem; overflow-x: auto; padding-bottom: 10px; flex-wrap: wrap; }
.btn-filter { background: #f8f9fa; border: 1px solid #dee2e6; padding: 8px 18px; border-radius: 20px; font-size: 0.9rem; white-space: nowrap; transition: all 0.3s ease; color: #666; cursor: pointer; }
.btn-filter.active, .btn-filter:hover { background: #c5a059; color: #fff; border-color: #c5a059; }
.table-container { background: #fff; border-radius: 12px; border: 1px solid rgba(212,175,55,0.2); overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.inbox-thead { background: #fcfaf5; font-size: 0.75rem; letter-spacing: 1px; }
.clickable-row { cursor: pointer; transition: background 0.2s; }
.clickable-row:hover { background: rgba(185,150,44,0.05) !important; }
.status-select { border: 1px solid rgba(185,150,44,0.3); border-radius: 6px; font-size: 0.85rem; padding: 4px 8px; color: #b9962c; font-weight: 600; background: #fff; cursor: pointer; transition: all 0.2s; }
.status-select:focus { outline: none; border-color: #b9962c; box-shadow: 0 0 0 2px rgba(185,150,44,0.1); }

/* ── 14. CHAT ── */
#messagesBox { background: #f8f9fa; padding: 20px; border-radius: 10px; display: flex; flex-direction: column; gap: 15px; }
.message-bubble { max-width: 80%; padding: 12px 16px; border-radius: 15px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.message-received { align-self: flex-start; background: #fff; border: 1px solid #eee; border-bottom-left-radius: 2px; }
.message-sent { align-self: flex-end; background: #c5a059; color: #fff; border-bottom-right-radius: 2px; }
.message-sent .text-muted { color: rgba(255,255,255,0.8) !important; }
.action-bar-card { border-top: 4px solid #c5a059; }

/* ── 15. CONTACTOS ── */
.contact-card { border: none; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: 100%; transition: all 0.3s ease; }
.contact-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(197,160,89,0.15); }
.contact-icon { font-size: 2rem; color: #c5a059; margin-bottom: 15px; display: inline-block; }
.contact-link { color: #333; text-decoration: none; display: block; padding: 5px 0; transition: color 0.2s; }
.contact-link:hover { color: #c5a059; }

/* ── 16. PAINEL ADMIN ── */
.admin-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.07); padding: 24px; margin-bottom: 24px; }
.user-row { border-bottom: 1px solid #f0f0f0; padding: 16px 0; }
.user-row:last-child { border-bottom: none; }
.badge-role { font-size: 11px; padding: 4px 10px; border-radius: 20px; font-weight: 600; }
.badge-headadmin { background: #1a1a2e; color: #fff; }
.badge-admin     { background: #b9962c; color: #fff; }
.badge-user      { background: #e9ecef; color: #555; }
.badge-banned    { background: #dc3545; color: #fff; }
.ip-chip { display: inline-block; background: #f0f0f0; border-radius: 20px; padding: 2px 10px; font-size: 11px; margin: 2px; color: #555; font-family: monospace; }
.btn-action { border: none; border-radius: 8px; padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.btn-action:hover { opacity: 0.8; }
.search-input { border-radius: 50px; padding: 10px 20px; border: 2px solid #eee; width: 100%; font-size: 15px; outline: none; transition: border 0.2s; }
.search-input:focus { border-color: #b9962c; }
.tab-btn { border: none; background: none; padding: 10px 20px; font-weight: 600; color: #888; border-bottom: 3px solid transparent; cursor: pointer; transition: all 0.2s; }
.tab-btn.active { color: #1a1a2e; border-bottom-color: #b9962c; }
.empty-state { text-align: center; padding: 40px; color: #aaa; }

/* ── 17. BOTÕES ADMIN DE EDIÇÃO ── */
#adminBar { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 1050; gap: 12px; }
.btn-admin-mode { background: #1a1a2e; color: #fff; border: none; border-radius: 50px; padding: 10px 20px; font-size: 14px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 6px; box-shadow: 0 4px 16px rgba(0,0,0,0.25); transition: background 0.2s; }
.btn-admin-mode:hover { background: #16213e; }
.btn-admin-mode.btn-admin-active { background: #198754; }
#btnAddProperty { background: #b9962c; color: #fff; border: none; border-radius: 50%; width: 52px; height: 52px; font-size: 24px; cursor: pointer; display: none; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,0.25); transition: background 0.2s; }
#btnAddProperty:hover { background: #a07a1a; }
.btn-admin-edit, .btn-admin-delete { border: none; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.btn-admin-edit { background: #fff; color: #1a1a2e; }
.btn-admin-edit:hover { background: #f0f0f0; }
.btn-admin-delete { background: #dc3545; color: #fff; }
.btn-admin-delete:hover { background: #b02a37; }

/* ── 18. DETALHE DO IMÓVEL ── */
.spec-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 16px 20px; height: 100%; }
.spec-card .label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #999; letter-spacing: 0.5px; margin-bottom: 4px; }
.spec-card .value { font-size: 15px; font-weight: 600; color: #1a1a2e; white-space: pre-line; }
.price-hero { font-size: 2rem; font-weight: 800; color: #b9962c; }
.carousel-inner img { height: 600px; object-fit: cover; width: 100%; }

/* ── 19. CALENDÁRIO DE VISITAS ── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-weekday { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; color: #999; padding: 8px 0; }
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; position: relative; font-size: 14px; font-weight: 600; transition: all 0.2s; background: #fff; border: 1px solid #f0f0f0; user-select: none; }
.cal-day:hover { transform: scale(1.06); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.cal-day.empty { background: transparent; border: none; cursor: default; }
.cal-day.empty:hover { transform: none; box-shadow: none; }
.cal-day.today { border: 2px solid #b9962c; color: #b9962c; }
.cal-day.today.occupied { background: #d8d5d0; color: #555; border: 2px solid #b9962c; }
.cal-day.today.pending  { background: #fffbea; color: #a07a00; border: 2px solid #b9962c; }
.cal-day.past  { opacity: 0.35; cursor: default; }
.cal-day.past:hover { transform: none; box-shadow: none; }
.cal-day.occupied { background: #d8d5d0; color: #555; }
.cal-day.pending  { background: #fffbea; color: #a07a00; }
.cal-day .dot-row { display: flex; gap: 3px; position: absolute; bottom: 5px; }
.dot { width: 5px; height: 5px; border-radius: 50%; }
.dot-confirmed { background: #b9962c; }
.dot-pending   { background: #f0c040; }
.dot-blocked   { background: #bbb; }
.week-slot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px; margin-bottom: 6px; font-size: 13px; }
.week-slot.confirmada { background: #f5f0e8; border-left: 3px solid #b9962c; }
.week-slot.pendente   { background: #fffbea; border-left: 3px solid #f0c040; }
.week-slot.blocked    { background: #f0eeeb; border-left: 3px solid #ccc; }
.week-slot.rejeitada  { background: #fff0f0; border-left: 3px solid #dc3545; }
.week-slot.cancelada  { background: #f5f5f5; border-left: 3px solid #ccc; }
#notifBanner { position: fixed; top: 90px; left: 50%; transform: translateX(-50%); z-index: 2000; min-width: 320px; max-width: 500px; display: none; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #555; }
.legend-box { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; }
.stat-card { background: #fff; border-radius: 12px; padding: 16px 20px; border: 1px solid #eee; text-align: center; }
.stat-card .num { font-size: 1.8rem; font-weight: 800; color: #b9962c; }
.stat-card .lbl { font-size: 12px; color: #999; text-transform: uppercase; }

@media (max-width: 576px) {
  .cal-day { font-size: 12px; border-radius: 7px; }
}