/* =====================================================================
   myImmo v2 — the design ("Modern"; the old bright "Klassiek" design was removed 27/11)
   Always loaded after app.css and overrides parts of it (app.css = base + components).
   Soft colour-fade background, softened colours, white top bar, a dark sidebar.
   ===================================================================== */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --radius-xs: 8px;

  --bg: #eef2f1;
  --bg-glow-1: transparent;
  --bg-glow-2: transparent;
  --panel: #fcfdfd;
  --panel-solid: #fdfefe;
  --panel-2: #f3f6f6;
  --panel-3: #e7eded;
  --border: rgba(22, 32, 42, .09);
  --border-strong: rgba(22, 32, 42, .17);
  --text: var(--mi-text, #151c22);
  --text-2: var(--mi-text-2, #3c4852);
  --muted: var(--mi-muted, #69767f);
  --input: #fbfcfc;
  --shadow: 0 1px 2px rgba(16, 24, 32, .05), 0 4px 16px -4px rgba(16, 24, 32, .07);
  /* softened colours */
  /* greens from the logo gradient (#3ccab6 → #22877d → #124f4a) */
  --accent: var(--mi-accent, #26867c);
  --accent-2: var(--mi-accent-2, #1d6f67);
  --pos: var(--mi-accent, #26867c);
  --neg: #c9566b;
  --orange: var(--mi-orange, #f0953f); --green: var(--mi-green, #2b9e8c); --pink: var(--mi-red, #cf5f73); --cyan: var(--mi-cyan, #3f93a3); --purple: var(--mi-purple, #8468c4); --blue: var(--mi-blue, #5584c9);

  /* sidebar */
  --sb-bg: var(--mi-ink, #121a20);
  --sb-text: #b9c3ca;
  --sb-muted: #6f7d87;
  --sb-hover: rgba(255, 255, 255, .06);
  --sb-line: rgba(255, 255, 255, .08);
  --sb-accent: var(--mi-teal-light, #3ccab6);
}

/* soft colour fade instead of flat grey: mint top-left, sand bottom-right */
body {
  background:
    radial-gradient(1100px 700px at 0% 0%, rgba(94, 200, 180, .20), transparent 60%),
    radial-gradient(1000px 700px at 100% 100%, rgba(232, 190, 140, .20), transparent 60%),
    radial-gradient(800px 600px at 100% 0%, rgba(140, 170, 230, .14), transparent 60%),
    linear-gradient(160deg, #e9f2f0 0%, #f0f2f5 50%, #f5f0ea 100%);
  background-attachment: fixed;
}

/* ---------- surfaces: solid, no glass ---------- */
.card { backdrop-filter: none; -webkit-backdrop-filter: none; }
.topbar {
  background: rgba(255, 255, 255, .78); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 10px -4px rgba(16, 24, 32, .08);
}
.page-title h1 { color: #17323a; }
.search-trigger { background: var(--panel-2); }
.clock b { font-weight: 700; }

/* ---------- sidebar ---------- */
.sidebar {
  background: var(--sb-bg); border-right: 0; color: var(--sb-text);
  backdrop-filter: none; -webkit-backdrop-filter: none;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.company-chip { background: rgba(255, 255, 255, .04); border-color: var(--sb-line); }
.company-chip .cc-txt { color: #eef2f4; }
.company-chip .ti { --c: var(--sb-accent); background: rgba(60, 202, 182, .12); box-shadow: none; }
.nav-label { color: var(--sb-muted); font-size: 10.5px; letter-spacing: .1em; }
.nav a { color: var(--sb-text); border-radius: 10px; position: relative; }
.nav a .i { color: var(--sb-muted); transition: color .15s; }
.nav a:hover { background: var(--sb-hover); color: #fff; }
.nav a:hover .i { color: #dfe6ea; }
.nav a.active { background: rgba(60, 202, 182, .12); color: #fff; box-shadow: none; }
.nav a.active .i { color: var(--sb-accent); }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--sb-accent); }
.nav .count { background: rgba(247, 162, 78, .2); color: #fbb26b; }
.sidebar-foot { border-top-color: var(--sb-line); }
.sidebar-foot .who b { color: #eef2f4; }
.sidebar-foot .who small { color: var(--sb-muted); }
.sidebar-foot .btn.ghost { color: var(--sb-muted); }
.sidebar-foot .btn.ghost:hover { background: var(--sb-hover); color: #fff; }

/* ---------- logo: myimmo-logo-dark.svg from the brand kit on the dark sidebar ---------- */

/* ---------- buttons, controls ---------- */
.btn { border-radius: 10px; }
.btn.sm { border-radius: 8px; }
.btn.primary { background: linear-gradient(180deg, var(--mi-accent-top, #2b968b), var(--accent-2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 6px 16px -8px var(--mi-accent-glow, rgba(29, 111, 103, .7)); }
.btn.primary:hover { background: linear-gradient(180deg, #279085, #165f58); filter: none; }
.btn-round { background: var(--panel); }
.seg .on, .seg input:checked + span { box-shadow: 0 1px 2px rgba(16, 24, 32, .12), inset 0 0 0 1px var(--border); background: #fff; }
.input:focus, .select:focus, .textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }

.tile-btn.on, .tile-btn[aria-pressed="true"], .type-tiles input:checked + .tile-btn {
  background: color-mix(in srgb, var(--c) 9%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent);
}

/* tables */
.table th { background: var(--panel-solid); color: var(--muted); }
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 4%, var(--panel-2)); }

/* ---------- login ---------- */
.auth-art {
  background: radial-gradient(700px 480px at 15% 15%, rgba(20, 184, 166, .16), transparent 60%), radial-gradient(600px 420px at 95% 95%, rgba(14, 116, 144, .14), transparent 60%), var(--sb-bg);
}
.auth-art h2 span, .auth-langs a:hover, .auth-langs a.on { color: var(--sb-accent); }

/* mobile: the sliding sidebar keeps its dark colour */
@media (max-width: 1024px) { .sidebar { background: var(--sb-bg); } }

/* compact menu: everything fits on a laptop screen without scrolling */
.sidebar { padding: 14px 14px 12px; gap: 2px; }
.sidebar .brand { padding: 4px 10px 12px; }
.company-chip { margin-bottom: 8px; padding: 7px 10px; }
.nav-group { margin-top: 4px; }
.nav-label { padding: 6px 12px 3px; }
.nav a { padding: 6px 12px; gap: 11px; }
.nav a .i { width: 17px; height: 17px; }
.nav a.active::before { top: 6px; bottom: 6px; }
.sidebar-foot { padding-top: 10px; }

/* property card badges follow the softened colours */
.pcard .ph-badge.rented { background: var(--green); }
.pcard .ph-badge.free { background: var(--orange); }

/* landlord name in the title bar, next to the clock (desktop); in the sliding menu on mobile */
.landlord { display: inline-flex; align-items: center; gap: 9px; max-width: 260px; padding: 0 16px; margin-left: 4px;
  border-left: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--text); text-decoration: none; }
.landlord b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.landlord .ti { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.landlord > a { display: inline-flex; align-items: center; gap: 9px; min-width: 0; color: inherit; text-decoration: none; }
.landlord > a:hover b { color: var(--accent); }
.landlord .client-switch { margin-left: -2px; flex: none; }
.company-chip .client-switch { margin-left: auto; flex: none; color: var(--sb-accent); }
/* client switch (partials/client_switch): one row per client, the open one marked */
.client-list form { margin: 0; }
.client-list .list-item { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.client-list .list-item:disabled { cursor: default; opacity: 1; }
.client-list form + form .list-item { border-top: 1px solid var(--border); }
.client-list .list-item:not(:disabled):hover { background: var(--panel-2); }
.client-list .grow b, .client-list .grow small { display: block; }
.client-list .grow small { color: var(--muted); font-size: 12px; }
.company-chip.mobile-only { display: none; }
@media (max-width: 1024px) { .landlord { display: none; } .company-chip.mobile-only { display: flex; } }
/* user block at the bottom of the sidebar = link to the profile */
.sidebar-foot a.who { color: inherit; text-decoration: none; border-radius: 10px; padding: 4px 6px; margin: -4px -6px; flex: 1; min-width: 0; }
.sidebar-foot a.who:hover, .sidebar-foot a.who.on { background: var(--sb-hover); }

/* ---------- web app on iPhone / iPad / Android (viewport-fit=cover) ----------
   keep the bottom menu, toasts and content clear of the home indicator / notch; landscape: clear of the side notch */
@media (max-width: 720px) {
  .bottom-nav { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); left: calc(10px + env(safe-area-inset-left, 0px)); right: calc(10px + env(safe-area-inset-right, 0px)); }
  .content { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
.topbar { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); }
@media (max-width: 720px) { .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); } }
.sidebar { padding-bottom: max(14px, env(safe-area-inset-bottom, 0px)); }
/* installed web app: no text selection callouts on buttons, no grey tap flash.
   Status bar in brand teal: Android / computers take it from theme-color (head_meta, manifest); iPhone / iPad ignore
   that, so there the page runs under the status bar (black-translucent) and this teal strip fills it. --sat = its height
   (0 elsewhere): topbar and sidebar start below it (app.css, mobile.css). */
@media (display-mode: standalone) {
  .btn, .bottom-nav a, .nav a { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
  body { -webkit-tap-highlight-color: transparent; }
  :root { --sat: env(safe-area-inset-top, 0px); }
  body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--sat); background: var(--mi-teal); z-index: 1000; pointer-events: none; }
}

/* ---------- login: one dark background over the whole page, like the admin login (brand --mi-dark-bg + grid) ----------
   the features (left) sit directly on it, a thin line between the halves; the white card (right) stands out */
.auth { position: relative; isolation: isolate; background: var(--mi-dark-bg, linear-gradient(150deg, #17323a, #121a20)); background-attachment: fixed; }
.auth > .mi-grid-bg { position: fixed; }
.auth-art { background: none; border-right: 0; }
.auth-form { background: none; }
.auth-card { box-shadow: 0 2px 6px rgba(0, 0, 0, .2), 0 30px 70px -24px rgba(0, 0, 0, .65); }
.auth-card .muted.small { color: var(--muted); }
