/* FasilKiray web marketplace — aligned with the Flutter app's blue, deep-navy and gold theme.
   Loaded after legacy web styles so every route shares the same visual system. */
:root {
  color-scheme: light;
  --bg: #F2F2F7;
  --surface: #FFFFFF;
  --surface-2: #E2EEF6;
  --text: #102F43;
  --muted: #697985;
  --line: #DCE5EC;
  --primary: #035585;
  --primary-2: #07334F;
  --accent: #FFC247;
  --accent-ink: #07334F;
  --shadow: 0 18px 48px rgba(7, 51, 79, .10);
  --shadow-soft: 0 8px 24px rgba(7, 51, 79, .08);
  --radius: 18px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(.2,.75,.25,1);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --surface: #1C1C1E;
  --surface-2: #2C2C2E;
  --text: #F5F7FA;
  --muted: #A1A1AA;
  --line: #38383A;
  --primary: #54B6EC;
  --primary-2: #07334F;
  --accent: #FFC247;
  --accent-ink: #07334F;
  --shadow: 0 18px 48px rgba(0,0,0,.34);
  --shadow-soft: 0 8px 24px rgba(0,0,0,.24);
}

* { scrollbar-color: color-mix(in srgb, var(--primary) 42%, transparent) transparent; }
html, body { background: var(--bg) !important; color: var(--text); }
body { font-family: Inter, "DM Sans", "Noto Sans Ethiopic", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.public-marketplace-page { background: var(--bg) !important; color: var(--text); }
body.public-marketplace-page::before {
  background:
    radial-gradient(ellipse at 5% 0%, rgba(3,85,133,.10), transparent 35%),
    radial-gradient(ellipse at 100% 12%, rgba(255,194,71,.12), transparent 27%),
    var(--bg) !important;
  opacity: 1;
}
body.public-marketplace-page::after { display: none !important; }
.public-marketplace-page .app-shell,
.workspace-route .app-shell { background: transparent !important; color: var(--text); }

/* Shared navigation and brand surfaces. */
.topbar,
.public-marketplace-page .topbar {
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow-soft) !important;
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}
.topbar .brand, .public-marketplace-page .topbar .brand { color: var(--text) !important; }
.topbar .brand small, .public-marketplace-page .topbar .brand small { color: var(--muted) !important; }
.brand-accent { color: var(--primary) !important; }
.desktop-nav a { color: var(--muted) !important; }
.desktop-nav a:hover { color: var(--primary) !important; }
.header-actions .theme-icon-button,
.header-actions .lang-btn,
.header-actions .icon-btn,
.header-actions .avatar-btn {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}
.header-actions .avatar-btn { background: var(--primary) !important; color: #fff !important; }
.btn-primary,
.public-marketplace-page .login-trigger,
.public-marketplace-page .header-actions .btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 8px 20px rgba(3,85,133,.18) !important;
}
.btn-primary:hover { background: var(--primary-2) !important; }
.btn-outline, .btn-quiet {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--primary) !important;
}
.btn-light { background: var(--accent) !important; color: var(--accent-ink) !important; }

/* Hero/search: primary blue with a warm gold highlight, like the mobile home screen. */
.public-marketplace-page .hero,
.workspace-route .hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, .96fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 18px clamp(24px, 4vw, 58px);
  width: min(1510px, calc(100% - 16px));
  min-height: 0;
  margin: clamp(22px, 3vw, 42px) auto 24px;
  padding: clamp(28px, 4.2vw, 62px);
  border: 1px solid rgba(255,255,255,.16) !important;
  border-radius: 30px;
  background:
    radial-gradient(ellipse at 92% 4%, rgba(255,194,71,.19), transparent 34%),
    linear-gradient(125deg, #07334F 0%, #035585 72%, #0876AA 100%) !important;
  box-shadow: 0 24px 64px rgba(7,51,79,.22), inset 0 1px 0 rgba(255,255,255,.14) !important;
  color: #fff !important;
  overflow: visible;
}
.public-marketplace-page .hero::before,
.workspace-route .hero::before {
  background: radial-gradient(ellipse at 18% 18%, rgba(255,255,255,.09), transparent 46%), linear-gradient(100deg, rgba(0,0,0,.08), transparent 66%) !important;
}
.public-marketplace-page .hero-copy,
.workspace-route .hero-copy { grid-column: 1; grid-row: 1 / span 2; max-width: 720px; position: relative; z-index: 2; }
.public-marketplace-page .hero-art, .workspace-route .hero-art { display: none !important; }
.public-marketplace-page .hero .eyebrow,
.workspace-route .hero .eyebrow { color: var(--accent) !important; }
.public-marketplace-page .hero h1,
.workspace-route .hero h1 { color: #fff !important; }
.public-marketplace-page .hero h1 em,
.workspace-route .hero h1 em { color: var(--accent) !important; }
.public-marketplace-page .hero-copy > p,
.workspace-route .hero-copy > p { color: rgba(255,255,255,.84) !important; }
.public-marketplace-page .hero-trust,
.workspace-route .hero-trust { color: rgba(255,255,255,.90) !important; }
.public-marketplace-page .hero-trust svg,
.workspace-route .hero-trust svg { color: var(--accent) !important; }
.market-mode-row {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-width: 0; padding: 4px;
  border: 1px solid rgba(255,255,255,.18); border-radius: 16px;
  background: rgba(0,24,43,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.market-mode-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.18); }
.market-mode-tab, .market-mode-sell {
  min-height: 42px; border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 850; transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.market-mode-tab { padding: 0 22px; color: rgba(255,255,255,.84); background: transparent; }
.market-mode-tab:hover, .market-mode-sell:hover { transform: translateY(-1px); }
.market-mode-tab.is-active { background: #fff; color: var(--primary-2); box-shadow: 0 4px 14px rgba(0,0,0,.16); }
.market-mode-sell { display: inline-flex; align-items: center; gap: 9px; padding: 0 16px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 5px 14px rgba(255,194,71,.18); }
.market-mode-sell .mode-arrow { font-size: 18px; line-height: 1; }
.public-marketplace-page .search-panel,
.workspace-route .search-panel {
  grid-column: 2; grid-row: 2; position: relative; inset: auto; left: auto; right: auto; bottom: auto;
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px;
  width: 100%; max-width: none; min-width: 0; margin: 0; padding: 17px;
  transform: none; border: 1px solid var(--line) !important; border-radius: 20px;
  background: var(--surface) !important; color: var(--text) !important;
  box-shadow: 0 18px 46px rgba(0,0,0,.18) !important;
}
.search-field:first-child { grid-column: 1 / -1; }
.public-marketplace-page .search-field,
.workspace-route .search-field {
  min-width: 0; min-height: 58px; padding: 9px 11px;
  border: 1px solid var(--line) !important; border-radius: 12px;
  background: var(--bg) !important; color: var(--text) !important;
}
.public-marketplace-page .search-field small,
.workspace-route .search-field small { color: var(--muted) !important; }
.public-marketplace-page .search-field input,
.public-marketplace-page .search-select-trigger,
.workspace-route .search-field input,
.workspace-route .search-select-trigger { color: var(--text) !important; }
.public-marketplace-page .search-field input::placeholder,
.workspace-route .search-field input::placeholder { color: var(--muted) !important; }
.public-marketplace-page .search-field-icon,
.workspace-route .search-field-icon { color: var(--primary) !important; }
.public-marketplace-page .search-button,
.workspace-route .search-button {
  grid-column: 1 / -1; width: 100%; min-height: 50px; margin-top: 2px;
  border-radius: 12px; background: var(--primary) !important; color: #fff !important;
  box-shadow: 0 8px 18px rgba(3,85,133,.19) !important;
}
.search-select-menu, .search-select-options, [role="listbox"] { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }

/* Content panels, cards and detail surfaces. */
.public-marketplace-page .content-section,
.public-marketplace-page .how-section,
.public-marketplace-page .contact-section,
.workspace-route .content-section,
.workspace-route .how-section,
.workspace-route .contact-section {
  background: var(--surface) !important; color: var(--text) !important;
  border: 1px solid var(--line) !important; box-shadow: var(--shadow-soft) !important;
}
.public-marketplace-page .section-heading h2,
.public-marketplace-page .steps h3,
.workspace-route .section-heading h2,
.workspace-route .steps h3 { color: var(--text) !important; }
.public-marketplace-page .section-heading p,
.public-marketplace-page .steps p,
.workspace-route .section-heading p,
.workspace-route .steps p { color: var(--muted) !important; }
.public-marketplace-page .section-heading .eyebrow,
.public-marketplace-page .recently-viewed-heading .eyebrow,
.workspace-route .section-heading .eyebrow { color: var(--primary) !important; }
.property-card, .browse-toolbar, .advanced-filter-row, .discovery-tools,
.steps article, .recently-viewed-card, .contact-box, .dashboard-card,
.dashboard-stat, .workspace-panel, .dashboard-listing, .dashboard-notification,
.admin-filter-toolbar, .bf-analytics-panel, .bf-analytics-metric {
  background: var(--surface) !important; color: var(--text) !important;
  border-color: var(--line) !important; box-shadow: var(--shadow-soft);
}
.property-card { overflow: hidden; transition: transform .2s var(--ease-out), box-shadow .2s var(--ease-out), border-color .2s ease; }
.property-card:hover { transform: translateY(-4px); box-shadow: var(--shadow) !important; border-color: color-mix(in srgb, var(--primary) 34%, var(--line)) !important; }
.card-title, .dashboard-card h2, .dashboard-listing-copy strong { color: var(--text) !important; }
.card-location, .card-specific-place, .card-meta, .dashboard-card p,
.dashboard-listing-copy span, .dashboard-listing-copy small { color: var(--muted); }
.card-price strong, .detail-price { color: var(--primary) !important; }
.badge-purpose { border: 1px solid rgba(255,255,255,.8); font-weight: 850; }
.badge-rent { background: #E2EEF6 !important; color: #07334F !important; }
.badge-sale { background: var(--accent) !important; color: #07334F !important; }
.detail-purpose-tag { display: inline-flex; align-items: center; margin-inline-start: 9px; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--primary); font-size: 11px; font-weight: 850; vertical-align: middle; }
.chip { border-color: var(--line); background: var(--surface); color: var(--text); }
.chip.active, .chip[aria-pressed="true"] { border-color: color-mix(in srgb, var(--primary) 38%, var(--line)) !important; background: var(--surface-2) !important; color: var(--primary) !important; }
.owner-cta {
  background: linear-gradient(120deg, #07334F, #035585) !important;
  color: #fff !important; border: 1px solid rgba(255,255,255,.12) !important;
}
.owner-cta h2, .owner-cta p, .owner-cta .eyebrow { color: #fff !important; }
.owner-cta .btn-light { background: var(--accent) !important; color: var(--accent-ink) !important; }
.footer { color: var(--muted); }
.footer .brand { color: var(--text); }

/* All workspaces, dialogs and form controls use the same mobile palette. */
.workspace-route, .workspace-route .app-shell,
.workspace-standalone, .workspace-shell, .workspace-content,
.workspace-modal { background: var(--bg) !important; color: var(--text) !important; }
.workspace-app { background: var(--bg) !important; color: var(--text) !important; }
.workspace-sidebar, .workspace-nav, .workspace-topbar, .workspace-header,
.workspace-mobile-nav { background: var(--surface) !important; border-color: var(--line) !important; }
.workspace-sidebar { color: var(--text) !important; box-shadow: 8px 0 28px rgba(7,51,79,.05); }
.workspace-main { background: var(--bg) !important; color: var(--text) !important; }
.workspace-topline { background: color-mix(in srgb, var(--surface) 94%, transparent) !important; border-color: var(--line) !important; color: var(--text) !important; }
.workspace-page { color: var(--text) !important; }
.workspace-topline-copy span, .workspace-topline-copy small { color: var(--muted) !important; }
.workspace-navigation .workspace-nav-item { color: var(--muted) !important; }
.workspace-navigation .workspace-nav-item.active, .workspace-navigation .workspace-nav-item[aria-current="page"] { background: var(--surface-2) !important; color: var(--primary) !important; }
.workspace-theme-toggle, .workspace-language-toggle, .workspace-market-link, .workspace-signout, .workspace-mobile-menu { background: var(--surface) !important; border-color: var(--line) !important; color: var(--text) !important; }
.workspace-nav a, .workspace-sidebar a { color: var(--muted) !important; }
.workspace-nav a.active, .workspace-sidebar a.active,
.workspace-nav a[aria-current="page"] { background: var(--surface-2) !important; color: var(--primary) !important; }
.dashboard-card, .dashboard-panel, .dashboard-stat, .dashboard-listing,
.admin-account-row, .admin-activity-row, .dashboard-report,
.dashboard-notification, .bf-contact-inbox, .bf-analytics-workspace {
  background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important;
}
.dashboard-card h1, .dashboard-card h2, .dashboard-card h3,
.dashboard-heading h1, .workspace-heading h1 { color: var(--text) !important; }
.dashboard-card p, .dashboard-card small, .dashboard-stat-label,
.dashboard-stat small { color: var(--muted) !important; }
.modal, dialog, .account-menu {
  background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important;
  box-shadow: 0 28px 85px rgba(0,0,0,.24) !important;
}
.modal::backdrop, dialog::backdrop { background: rgba(2,18,30,.58); backdrop-filter: blur(5px); }
.form-grid input, .form-grid select, .form-grid textarea,
input, select, textarea {
  background-color: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important;
}
input::placeholder, textarea::placeholder { color: var(--muted) !important; }
.form-grid label, .form-grid label span, .field-hint { color: var(--text); }
.account-menu>button { color: var(--text) !important; }
.account-menu>button:hover { background: var(--surface-2) !important; }
.listing-status, .count-chip, .section-kicker { border-color: var(--line); }
.toast { background: var(--primary-2) !important; color: #fff !important; box-shadow: var(--shadow); }
.mobile-nav {
  background: color-mix(in srgb, var(--surface) 94%, transparent) !important;
  border-top: 1px solid var(--line) !important; box-shadow: 0 -8px 28px rgba(7,51,79,.08);
}
.mobile-nav a { color: var(--muted) !important; }
.mobile-nav a.selected, .mobile-nav a[aria-current="page"] { color: var(--primary) !important; }
.mobile-nav a.selected svg, .mobile-nav a[aria-current="page"] svg { stroke: var(--primary) !important; }

@media (max-width: 900px) {
  .public-marketplace-page .hero, .workspace-route .hero {
    grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto auto;
    gap: 15px; padding: clamp(24px,5vw,40px);
  }
  .public-marketplace-page .hero-copy, .workspace-route .hero-copy { grid-column: 1; grid-row: 1; }
  .market-mode-row { grid-column: 1; grid-row: 2; }
  .public-marketplace-page .search-panel, .workspace-route .search-panel { grid-column: 1; grid-row: 3; }
}
@media (max-width: 650px) {
  .public-marketplace-page .app-shell, .workspace-route .app-shell { padding-inline: 0; }
  .workspace-sidebar { background: var(--surface) !important; }
  .public-marketplace-page .topbar, .workspace-route .topbar { top: 0; width: calc(100% - 16px); min-height: 62px; margin: 8px auto 0; padding: 8px 10px; border-radius: 16px; }
  .public-marketplace-page .hero, .workspace-route .hero {
    width: calc(100% - 16px); margin: 14px auto 18px; padding: 25px 18px 22px;
    border-radius: 22px; gap: 14px;
  }
  .public-marketplace-page .hero h1, .workspace-route .hero h1 { font-size: clamp(37px,10vw,52px); }
  .market-mode-row { flex-wrap: nowrap; padding: 4px; border-radius: 14px; }
  .market-mode-switch { flex: 1; min-width: 0; }
  .market-mode-tab { flex: 1; min-width: 0; padding-inline: 12px; }
  .market-mode-sell { min-width: max-content; padding-inline: 12px; font-size: 12px; }
  .public-marketplace-page .search-panel, .workspace-route .search-panel { width: 100%; padding: 11px; gap: 8px; border-radius: 16px; }
  .public-marketplace-page .search-field, .workspace-route .search-field { min-height: 54px; padding: 7px 8px; }
  .public-marketplace-page .content-section, .public-marketplace-page .how-section,
  .workspace-route .content-section, .workspace-route .how-section { width: calc(100% - 16px); margin: 12px auto; padding: 23px 15px; border-radius: 19px; }
  .property-grid { gap: 14px; }
  .property-card { border-radius: 17px; }
  .owner-cta { margin: 24px 12px 32px; padding: 25px 20px; border-radius: 21px; }
  .form-grid { gap: 12px; }
  .detail-purpose-tag { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
