@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=DM+Serif+Display&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'DM Sans', 'Segoe UI', sans-serif; background: #f5f6fa; color: #1f2937; }
a { text-decoration: none; }
img { max-width: 100%; }

/* Navbar */
.app-navbar {
  background: #0f2044;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  position: sticky;
  top: 0;
  z-index: 200;
  gap: 20px;
}
.app-navbar-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.app-navbar-logo { height: 56px; width: 56px; object-fit: cover; border-radius: 10px; }
.app-navbar-name { font-family: 'DM Serif Display', serif; font-size: 24px; color: #fff; letter-spacing: -0.3px; }
.app-navbar-name span { color: #f59e0b; }
.app-navbar-links { display: flex; gap: 28px; list-style: none; flex: 1; justify-content: center; }
.app-navbar-links a { color: #93c5fd; font-size: 14px; font-weight: 500; transition: color .2s; white-space: nowrap; }
.app-navbar-links a:hover { color: #fff; }
.app-navbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.app-navbar-btn { padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; border: none; transition: opacity .2s; }
.app-navbar-btn--cta { background: #f59e0b; color: #78350f; }
.app-navbar-btn--outline { background: transparent; color: #93c5fd; border: 1.5px solid rgba(147,197,253,.4); }
.app-navbar-btn--outline:hover { border-color: #93c5fd; color: #fff; }
.app-navbar-btn--logout { background: #e74c3c; color: #fff; }
.app-navbar-btn:hover { opacity: .88; }

/* Footer */
.site-footer { background: #0f2044; color: #93c5fd; text-align: center; padding: 30px 20px; margin-top: 60px; }
.site-footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; font-family: 'DM Serif Display', serif; font-size: 18px; color: #fff; }
.site-footer-brand span span { color: #f59e0b; }
.site-footer-logo-img { height: 44px; width: 44px; object-fit: cover; border-radius: 8px; }
.site-footer p { font-size: 13px; opacity: .8; }

/* Buttons */
button, .btn { cursor: pointer; padding: 10px 20px; border: none; border-radius: 8px; background: #2563eb; color: #fff; font-weight: 600; font-size: 14px; transition: opacity .2s; }
button:hover, .btn:hover { opacity: .9; }
button:disabled { background: #ccc; cursor: not-allowed; }
.btn-orange { background: #f59e0b; color: #78350f; }
.btn-outline { background: transparent; border: 1.5px solid #2563eb; color: #2563eb; }
.btn-danger { background: #e74c3c; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Forms */
input, select, textarea { padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; margin-bottom: 12px; width: 100%; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
.form-group { margin-bottom: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.error-message { background: #fee2e2; color: #991b1b; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.success-message { background: #dcfce7; color: #166534; padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }

main { min-height: 70vh; }
.container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.card { background: #fff; border-radius: 14px; padding: 28px; box-shadow: 0 2px 10px rgba(0,0,0,.06); margin-bottom: 24px; }

/* Landing hero */
.hero { background: linear-gradient(180deg, #0f2044, #16306e); color: #fff; text-align: center; padding: 80px 20px 60px; }
.hero-badge { display: inline-block; background: rgba(245,158,11,.15); color: #f59e0b; padding: 6px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: 42px; font-family: 'DM Serif Display', serif; margin-bottom: 16px; }
.hero h1 span { color: #f59e0b; }
.hero p { color: #c7d2fe; max-width: 600px; margin: 0 auto 30px; font-size: 16px; }
.search-bar { display: flex; gap: 0; max-width: 700px; margin: 0 auto 40px; background: #fff; border-radius: 10px; padding: 6px; }
.search-bar input, .search-bar select { margin-bottom: 0; border: none; }
.search-bar button { border-radius: 8px; padding: 10px 28px; background: #2563eb; }
.hero-stats { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; }
.hero-stat-num { font-size: 28px; font-weight: 700; color: #fff; }
.hero-stat-label { font-size: 13px; color: #93c5fd; }

.section-header { text-align: center; margin-bottom: 30px; }
.section-header h2 { font-family: 'DM Serif Display', serif; font-size: 28px; margin-bottom: 8px; }
.section-header p { color: #6b7280; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.prop-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.prop-card img { width: 100%; height: 170px; object-fit: cover; }
.prop-card-body { padding: 16px; }
.prop-card-tag { background: #eef2ff; color: #4338ca; font-size: 12px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.prop-card-title { font-weight: 700; font-size: 16px; margin: 10px 0 4px; }
.prop-card-price { font-size: 18px; font-weight: 700; color: #2563eb; }
.prop-card-meta { color: #6b7280; font-size: 13px; margin-top: 4px; }

/* Dashboard */
.dashboard-header { background: #0f2044; color: #fff; padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.dashboard-brand { display: flex; align-items: center; gap: 14px; }
.dashboard-logo { height: 60px; width: 60px; border-radius: 10px; object-fit: cover; }
.dashboard-header h1 { font-size: 20px; font-family: 'DM Serif Display', serif; }
.user-info { display: flex; align-items: center; gap: 16px; }
.id-badge { background: rgba(245,158,11,.15); color: #f59e0b; padding: 6px 14px; border-radius: 8px; font-size: 13px; }

.dashboard-tabs { display: flex; gap: 6px; background: #fff; padding: 0 30px; border-bottom: 1px solid #e5e7eb; flex-wrap: wrap; }
.tab-btn { background: none; color: #6b7280; padding: 14px 18px; border-radius: 0; font-weight: 600; border-bottom: 3px solid transparent; }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }
.tab-btn:hover { opacity: 1; background: #f9fafb; }

.dashboard-content { max-width: 1100px; margin: 0 auto; padding: 30px 20px; }
.section-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }

.list-item { background: #fff; border-radius: 12px; padding: 18px; margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,.05); }
.list-item h3 { margin-bottom: 6px; }
.list-item p { font-size: 14px; color: #4b5563; margin: 2px 0; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-approved, .badge-completed, .badge-active, .badge-signed { background: #dcfce7; color: #166534; }
.badge-rejected, .badge-failed, .badge-terminated { background: #fee2e2; color: #991b1b; }
.badge-draft, .badge-overdue, .badge-pending_renter_sign, .badge-pending_owner_sign { background: #e0e7ff; color: #3730a3; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; }
.stat-card { background: #fff; border-radius: 14px; padding: 22px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.stat-card h3 { font-size: 28px; color: #2563eb; }
.stat-card p { color: #6b7280; font-size: 13px; margin-top: 6px; }

.toggle-switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #d1d5db; border-radius: 24px; transition: .2s; }
.toggle-slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle-switch input:checked + .toggle-slider { background: #2563eb; }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(22px); }

.image-preview { max-width: 220px; border-radius: 10px; margin-top: 10px; }

/* Auth pages */
.auth-form { max-width: 440px; margin: 50px auto; background: #fff; padding: 36px; border-radius: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.auth-form h1 { font-family: 'DM Serif Display', serif; margin-bottom: 20px; text-align: center; }
.auth-form p { text-align: center; margin-top: 14px; font-size: 14px; color: #6b7280; }

/* Rental laws chat */
.rl-layout { display: flex; gap: 24px; max-width: 1100px; margin: 0 auto; padding: 30px 20px; align-items: flex-start; }
.rl-sidebar { width: 280px; background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 2px 10px rgba(0,0,0,.06); flex-shrink: 0; }
.rl-sidebar h2 { font-size: 18px; margin-bottom: 4px; }
.rl-sidebar p { color: #6b7280; font-size: 13px; margin-bottom: 18px; }
.rl-suggestion-btn { display: block; width: 100%; text-align: left; background: #f3f4f6; color: #374151; font-size: 13px; font-weight: 500; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; }
.rl-suggestion-btn:hover { background: #e5e7eb; }
.rl-disclaimer { font-size: 12px; color: #9ca3af; margin-top: 16px; }
.rl-chat { flex: 1; background: #fff; border-radius: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; flex-direction: column; height: 600px; }
.rl-messages { flex: 1; overflow-y: auto; padding: 20px; }
.rl-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.rl-msg-avatar { width: 32px; height: 32px; border-radius: 50%; background: #eef2ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rl-msg-bubble { background: #f3f4f6; padding: 10px 14px; border-radius: 12px; font-size: 14px; max-width: 70%; white-space: pre-wrap; }
.rl-msg--user { flex-direction: row-reverse; }
.rl-msg--user .rl-msg-bubble { background: #2563eb; color: #fff; }
.rl-input-row { display: flex; gap: 10px; padding: 16px; border-top: 1px solid #e5e7eb; }
.rl-input-row textarea { margin-bottom: 0; resize: none; }

@media (max-width: 768px) {
  .app-navbar { padding: 0 16px; height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .app-navbar-links { order: 3; width: 100%; justify-content: center; flex-wrap: wrap; gap: 16px; }
  .rl-layout { flex-direction: column; }
  .rl-sidebar { width: 100%; }
}
