/* Tevrna Estate Manager — frontend. */
.tevrna-em-btn { display: inline-block; background: #2563eb; color: #fff; border: 0; padding: 10px 20px; border-radius: 4px; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.3; }
.tevrna-em-btn:hover, .tevrna-em-btn:focus { color: #fff; filter: brightness(.95); }
.tevrna-em-btn.is-active { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.tevrna-em-btn-small { padding: 5px 10px; font-size: 12px; }
.tevrna-em-btn-full { width: 100%; }
.tevrna-em-btn-success { background: #10b981; }
.tevrna-em-btn-danger { background: #ef4444; }
.tevrna-em-btn-warning { background: #f59e0b; }
.tevrna-em-btn-purple { background: #8b5cf6; }
.tevrna-em-btn-dark { background: #1e293b; }
.tevrna-em-btn.is-saved { background: #b91c1c; }
.tevrna-em-right { text-align: end; }
.tevrna-em-muted { color: #64748b; font-size: 13px; }

.tevrna-em-alert { padding: 15px; border-radius: 6px; margin: 0 0 20px; }
.tevrna-em-alert-success { background: #d1fae5; color: #065f46; }
.tevrna-em-alert-info { background: #dbeafe; color: #1e40af; }
.tevrna-em-alert-warning { background: #fef3c7; color: #92400e; }
.tevrna-em-alert-error { background: #fee2e2; color: #b91c1c; }

.tevrna-em-box { background: #fff; padding: 25px; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); margin: 0 0 20px; }
.tevrna-em-box-muted { background: #f8fafc; }
.tevrna-em-box h3 { margin-top: 0; }
.tevrna-em-form input[type="text"], .tevrna-em-form input[type="email"], .tevrna-em-form input[type="tel"], .tevrna-em-form input[type="number"], .tevrna-em-form input[type="datetime-local"], .tevrna-em-form textarea,
.tevrna-em-mortgage input { display: block; width: 100%; box-sizing: border-box; padding: 10px; margin: 0 0 12px; border: 1px solid #cbd5e1; border-radius: 4px; }
.tevrna-em-mortgage label { display: block; font-weight: 600; }
.tevrna-em-mortgage-result { margin-top: 20px; padding: 15px; background: #dbeafe; color: #1e40af; border-radius: 4px; font-weight: 700; text-align: center; }
.tevrna-em-recaptcha { margin-bottom: 15px; }

.tevrna-em-sort { text-align: end; margin-bottom: 20px; }
.tevrna-em-sort select { padding: 8px; border-radius: 4px; }
.tevrna-em-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tevrna-em-card-item { border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.tevrna-em-card-media { height: 220px; background: #f1f5f9; position: relative; }
.tevrna-em-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
.tevrna-em-tag { position: absolute; top: 10px; padding: 5px 10px; border-radius: 4px; font-weight: 700; font-size: 13px; color: #fff; }
.tevrna-em-tag-left { inset-inline-start: 10px; background: #f59e0b; }
.tevrna-em-tag-right { inset-inline-end: 10px; background: #10b981; }
.tevrna-em-card-body { padding: 15px; }
.tevrna-em-card-body h3 { margin: 0 0 10px; font-size: 18px; }
.tevrna-em-card-body h3 a { text-decoration: none; color: #0f172a; }
.tevrna-em-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #64748b; font-size: 13px; }
.tevrna-em-pagination { margin-top: 30px; text-align: center; }

.tevrna-em-slider { position: relative; margin-bottom: 30px; }
.tevrna-em-slider-track { display: flex; gap: 15px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tevrna-em-slider-track::-webkit-scrollbar { display: none; }
.tevrna-em-slide { flex: 0 0 calc((100% - 30px) / 3); scroll-snap-align: start; text-decoration: none; color: inherit; }
.tevrna-em-slide .tevrna-em-cover { height: 200px; border-radius: 8px; }
.tevrna-em-slide-title { display: block; text-align: center; font-weight: 600; margin-top: 8px; }
.tevrna-em-slider-nav { position: absolute; top: 85px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .7); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }
.tevrna-em-slider-prev { inset-inline-start: 6px; }
.tevrna-em-slider-next { inset-inline-end: 6px; }
@media (max-width: 782px) { .tevrna-em-slide { flex-basis: 85%; } }

.tevrna-em-search { display: flex; flex-wrap: wrap; gap: 10px; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0, 0, 0, .1); }
.tevrna-em-search input, .tevrna-em-search select { flex: 1 1 150px; padding: 12px; border: 1px solid #cbd5e1; border-radius: 4px; }

.tevrna-em-half-map { display: flex; height: 600px; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; position: relative; }
.tevrna-em-map-sidebar { width: 40%; background: #f8fafc; padding: 20px; overflow-y: auto; border-inline-end: 1px solid #e2e8f0; box-sizing: border-box; }
.tevrna-em-half-map-nomap { height: auto; }
.tevrna-em-half-map-nomap .tevrna-em-map-sidebar { width: 100%; border: 0; }
.tevrna-em-map-canvas { width: 60%; height: 100%; background: #e2e8f0; }
.tevrna-em-map-item { background: #fff; padding: 15px; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 10px; }
.tevrna-em-map-item h4 { margin: 0 0 5px; }
.tevrna-em-map-item strong { color: #10b981; }
.tevrna-em-admin-hint { position: absolute; bottom: 10px; inset-inline-end: 10px; background: #fef3c7; padding: 8px 12px; border-radius: 4px; font-size: 12px; margin: 0; }
@media (max-width: 782px) {
	.tevrna-em-half-map { flex-direction: column; height: auto; }
	.tevrna-em-map-sidebar, .tevrna-em-map-canvas { width: 100%; }
	.tevrna-em-map-sidebar { max-height: 300px; }
	.tevrna-em-map-canvas { height: 400px; }
}

.tevrna-em-compare { display: flex; gap: 15px; overflow-x: auto; padding-bottom: 15px; }
.tevrna-em-compare-item { flex: 0 0 250px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 15px; }
.tevrna-em-compare-img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; }
.tevrna-em-price { color: #10b981; font-weight: 700; }

.tevrna-em-list-cards { list-style: none; padding: 0; margin: 0; }
.tevrna-em-list-cards li { padding: 15px; border: 1px solid #e2e8f0; margin-bottom: 10px; border-radius: 5px; background: #fff; display: flex; justify-content: space-between; gap: 10px; }
.tevrna-em-table-front { width: 100%; border-collapse: collapse; background: #fff; }
.tevrna-em-table-front th, .tevrna-em-table-front td { padding: 12px; text-align: start; border-bottom: 1px solid #e2e8f0; }
.tevrna-em-table-front th { background: #f8fafc; }

.tevrna-em-auth { display: flex; flex-wrap: wrap; gap: 20px; }
.tevrna-em-auth > .tevrna-em-box { flex: 1 1 300px; }
.tevrna-em-auth #tevrna-em-login-form input[type="text"], .tevrna-em-auth #tevrna-em-login-form input[type="password"] { width: 100%; box-sizing: border-box; padding: 10px; }

.tevrna-em-portal { background: #f8fafc; padding: 25px; border-radius: 8px; border: 1px solid #e2e8f0; }
.tevrna-em-portal h2 { margin-top: 0; }
.tevrna-em-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.tevrna-em-portal .tevrna-em-table-front { display: block; overflow-x: auto; }

/* Badges */
.tevrna-em-tag-left { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-wrap: wrap; gap: 4px; }
.tevrna-em-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tevrna-em-badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; color: #fff; background: #64748b; }
.tevrna-em-badge-featured { background: #f59e0b; }
.tevrna-em-badge-sold, .tevrna-em-badge-rented { background: #ef4444; }
.tevrna-em-badge-under_offer { background: #8b5cf6; }
.tevrna-em-badge-new { background: #10b981; }
.tevrna-em-badge-reduced { background: #2563eb; }
.tevrna-em-badge-epc { background: #0f766e; }

/* Single property & agent layout */
.tevrna-em-single { display: block; }
.tevrna-em-section { margin: 0 0 30px; }
.tevrna-em-section h3 { margin: 0 0 12px; }
.tevrna-em-single-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 20px; }
.tevrna-em-single-price { font-size: 26px; font-weight: 800; color: #10b981; }
.tevrna-em-gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 140px; gap: 8px; }
.tevrna-em-gallery-item { display: block; overflow: hidden; border-radius: 6px; }
.tevrna-em-gallery-item.is-main { grid-column: span 2; grid-row: span 2; }
.tevrna-em-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.tevrna-em-gallery-item:hover img { transform: scale(1.04); }
.tevrna-em-details { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.tevrna-em-detail { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; }
.tevrna-em-detail span { color: #64748b; font-size: 12px; }
.tevrna-em-features { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
.tevrna-em-features li::before { content: "\2713"; color: #10b981; margin-inline-end: 6px; font-weight: 700; }
.tevrna-em-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.tevrna-em-floorplan { max-width: 100%; height: auto; border-radius: 6px; }
.tevrna-em-map-single { height: 350px; border-radius: 8px; }
.tevrna-em-agent-box { display: flex; gap: 16px; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 16px; }
.tevrna-em-agent-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: 0 0 96px; }
.tevrna-em-agent-info h3 { margin: 4px 0; }
.tevrna-em-agent-info p { margin: 4px 0; }
.tevrna-em-agent-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tevrna-em-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.tevrna-em-contact-grid .tevrna-em-box { max-width: none; margin: 0; }
@media (max-width: 782px) { .tevrna-em-gallery { grid-template-columns: repeat(2, 1fr); } }

/* Lightbox */
.tevrna-em-lightbox { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .92); display: flex; align-items: center; justify-content: center; }
.tevrna-em-lightbox[hidden] { display: none; }
.tevrna-em-lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 6px; }
.tevrna-em-lightbox button { position: absolute; background: rgba(255, 255, 255, .15); color: #fff; border: 0; width: 46px; height: 46px; border-radius: 50%; font-size: 28px; line-height: 1; cursor: pointer; }
.tevrna-em-lb-close { top: 16px; inset-inline-end: 16px; }
.tevrna-em-lb-prev { inset-inline-start: 16px; top: 50%; }
.tevrna-em-lb-next { inset-inline-end: 16px; top: 50%; }
[dir="rtl"] .tevrna-em-lb-prev, [dir="rtl"] .tevrna-em-lb-next { transform: scaleX(-1); }
