@font-face {
  font-family: "Mark GEO";
  src: url("/fonts/mark-geo.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  font-family: "Mark GEO", "Noto Sans Georgian", Arial, sans-serif;
  color: #212123;
  background: #f7f3ef;
}

* { box-sizing: border-box; }

button, input, select, textarea, option, optgroup, code, pre, kbd, samp {
  font-family: inherit;
}
input::file-selector-button { font-family: inherit; }

body { margin: 0; background: #f7f3ef; }

main { width: min(100% - 32px, 820px); margin: 0 auto; padding: 42px 0 80px; }
main.narrow { max-width: 460px; }

h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.25; margin: 0 0 12px; color: #212123; }
h2 { font-size: 1.15rem; line-height: 1.4; margin: 0; color: #212123; }
p { line-height: 1.55; }
a { color: #873c1e; text-underline-offset: 3px; }
.site-header { display: flex; align-items: center; gap: 20px; min-height: 68px; padding: 12px max(16px, calc((100% - 1120px) / 2)); border-bottom: 1px solid #e8ddd5; background: #fff; }
.mobile-page-title, .menu-toggle { display: none; }
.new-visit-link { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid #873c1e; border-radius: 50%; color: #873c1e; font-size: 1.55rem; line-height: 1; text-decoration: none; }
.new-visit-link:hover { background: #f7f3ef; }
.menu-toggle { width: 44px; height: 44px; border: 0; border-radius: 6px; background: transparent; color: #212123; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .15s ease, opacity .15s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
.menu-toggle:focus-visible { outline: 3px solid #deb34a; outline-offset: 2px; }
.top-nav, .account-nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-nav a, .account-nav a, .top-nav button, .account-nav button { color: #3a2a24; font: inherit; text-decoration: none; }
.top-nav a[aria-current="page"], .account-nav a[aria-current="page"] { color: #212123; font-weight: 700; }
.account-nav { margin-left: auto; }
.current-user { max-width: 180px; overflow: hidden; color: #75655b; text-overflow: ellipsis; white-space: nowrap; }
.top-nav button, .account-nav button, .text-action { appearance: none; border: 0; background: none; padding: 0; color: #873c1e; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.top-nav button:focus-visible, .account-nav button:focus-visible, .text-action:focus-visible { outline: 3px solid #deb34a; outline-offset: 4px; }
.site-header.nav-grouped { position: relative; z-index: 20; flex-wrap: nowrap; gap: 12px; min-height: 64px; }
.nav-grouped .top-nav { flex: 1; min-width: 0; flex-wrap: nowrap; gap: 8px; }
.nav-grouped .top-nav > a { display: flex; align-items: center; min-height: 40px; padding: 8px 10px; border-radius: 6px; white-space: nowrap; }
.nav-grouped .account-nav { min-width: 0; flex: 0 1 180px; flex-wrap: nowrap; }
.nav-dropdown { position: relative; flex: 0 0 auto; }
.nav-dropdown summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 10px; border-radius: 6px; color: #3a2a24; cursor: pointer; list-style: none; white-space: nowrap; }
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); flex: 0 0 auto; }
.nav-dropdown[open] > summary::after { transform: rotate(225deg) translate(-2px, -1px); }
.nav-dropdown summary:hover, .nav-dropdown[open] > summary, .nav-grouped .top-nav > a:hover { background: #f7f3ef; }
.nav-dropdown--current > summary { color: #212123; font-weight: 700; }
.nav-dropdown summary:focus-visible { outline: 3px solid #deb34a; outline-offset: 2px; }
.nav-dropdown__panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 220px; padding: 6px; border: 1px solid #e8ddd5; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px #2121231a; }
.nav-dropdown__panel a, .nav-dropdown__panel button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: 4px; text-align: left; text-decoration: none; white-space: nowrap; }
.nav-dropdown__panel a:hover, .nav-dropdown__panel button:hover { background: #f7f3ef; }
.nav-dropdown--account { min-width: 0; flex: 1; width: 100%; }
.nav-dropdown--account .nav-dropdown__panel { left: auto; right: 0; min-width: 150px; }
.nav-dropdown--account .current-user { display: block; }

@media (max-width: 900px) {
  .site-header.nav-grouped { gap: 0; min-height: 56px; padding: 6px 16px; }
  .nav-grouped .mobile-page-title { display: block; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 700; }
  .nav-grouped .new-visit-link { order: 1; width: 38px; height: 38px; margin-left: auto; margin-right: 6px; }
  .nav-grouped .menu-toggle { order: 2; display: grid; place-content: center; gap: 5px; margin-left: 0; }
  .site-header.nav-grouped > .top-nav { display: none; }
  .site-header.nav-grouped.menu-open > .top-nav { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 8px 16px; max-height: calc(100svh - 70px); overflow-y: auto; border-bottom: 1px solid #e8ddd5; background: #fff; box-shadow: 0 8px 20px #21212314; }
  .nav-grouped .nav-dropdown__panel { position: static; min-width: 0; padding: 0 0 4px 12px; border: 0; border-radius: 0; box-shadow: none; }
  .nav-grouped .account-nav { display: block; width: 100%; margin: 2px 0 0; border-top: 1px solid #e8ddd5; }
  .nav-grouped .nav-dropdown--account .current-user { max-width: none; }
}
.form-stack { margin: 18px 0 32px; }
.form-message { min-height: 1.5em; color: #444; }
.credential { border: 1px solid #d8c6bb; border-radius: 8px; padding: 16px; margin: 20px 0 32px; background: #fff; }
.credential code { display: inline-block; padding: 8px; background: #f5f5f5; overflow-wrap: anywhere; }
.customer-context { border: 1px solid #d8c6bb; border-radius: 8px; padding: 12px 16px; margin: 0 0 24px; background: #fff; }
.customer-context p { margin: 0 0 10px; }
.customer-context .button { margin: 0 12px 0 0; }
.conflict-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; border-top: 1px solid #e8ddd5; padding: 14px 0; }
.customer-row strong { min-width: 160px; }
.customer-row span { flex: 1; min-width: 100px; color: #555; }
.consultant-list { list-style: none; margin: 12px 0; padding: 0; }
.consultant-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; border-top: 1px solid #e8ddd5; padding: 12px 0; }
.consultant-list li > span { flex: 1 1 100%; min-width: 0; overflow-wrap: anywhere; }
.consultant-showroom { flex: 1 1 260px; min-width: 0; max-width: 100%; margin: 4px 0; }
.consultant-list button { border: 0; background: none; padding: 0; color: #212123; font: inherit; text-decoration: underline; cursor: pointer; }
.consultant-list button:focus-visible { outline: 3px solid #deb34a; outline-offset: 3px; }

.actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0 0 28px; }
.button { appearance: none; border: 1px solid #873c1e; border-radius: 6px; min-height: 44px; padding: 10px 18px; background: #873c1e; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.button:hover { background: #73321a; }
.button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #deb34a; outline-offset: 3px; }
.button-secondary { background: #fff; color: #873c1e; }
.button-secondary:hover { background: #f3ebe5; }
.progress { margin: 0; color: #555; }

.page-intro { max-width: 62ch; margin: 0 0 24px; color: #5f5048; }
.page-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-heading-row h1 { margin: 0; }
.compact-button { min-height: 40px; padding: 7px 14px; text-decoration: none; }
.search-panel, .profile-editor { border: 1px solid #d8c6bb; border-radius: 8px; padding: 18px; background: #fff; }
.search-field { margin-bottom: 0; }
.profile-editor { margin-top: 28px; }
.profile-editor summary { color: #212123; font-size: 1.12rem; font-weight: 700; cursor: pointer; }
.profile-editor[open] summary { margin-bottom: 4px; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.customer-profile-details { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 6px 12px; font-size: .88rem; }
.customer-profile-details dt { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.customer-profile-details dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.customer-profile-details[hidden] { display: none; }
@media (max-width: 600px) {
  .customer-profile-details { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .customer-profile-details dd { margin-bottom: 8px; }
}
.visitor-comments-container { grid-column: 1 / -1; margin-top: 12px; min-width: 0; }
#visit-comments { scroll-margin-top: 90px; }
.visitor-comments-container > summary { cursor: pointer; font-weight: 700; }
.consultant-list fieldset { display: grid; gap: 8px; min-width: 0; }
.customer-list { margin: 16px 0; }
.customer-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, auto); grid-template-areas: "name actions" "meta actions" "contacts actions"; column-gap: 28px; align-items: start; border: 1px solid #e8ddd5; border-radius: 8px; padding: 16px; margin: 10px 0; background: #fff; }
.customer-card h2 { grid-area: name; font-size: 1.06rem; }
.customer-meta { grid-area: meta; margin: 5px 0; color: #5f5048; }
.customer-contacts, .card-actions { display: flex; gap: 10px 16px; flex-wrap: wrap; margin-top: 10px; }
.customer-contacts { grid-area: contacts; }
.customer-contacts a { overflow-wrap: anywhere; }
/* Visitor attribution and notes must occupy separate rows, including on mobile. */
body[data-page="visitors"] .customer-card { grid-template-areas: "name actions" "meta actions" "attribution actions" "contacts actions"; }
body[data-page="visitors"] .visitor-attribution { grid-area: attribution; }
body[data-page="visitors"] .customer-contacts { min-width: 0; overflow-wrap: anywhere; }
.card-actions { grid-area: actions; display: grid; align-items: start; justify-items: start; margin-top: 0; }
.duplicate-warning { border-left: 3px solid #b86a56; padding-left: 10px; color: #704034; line-height: 1.5; }
.profile-conflict { border-left: 3px solid #b86a56; margin: 16px 0; padding: 10px 12px; background: #fff7f4; color: #704034; }
.profile-conflict p { margin: 0 0 10px; }
.event-history { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid #e8ddd5; }
.event-history li { display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid #e8ddd5; }
.event-history span { color: #75655b; font-size: .92rem; }
.empty-state { color: #5f5048; }
.photo-consent, .guide-hint { margin: 12px 0; padding: 10px 12px; border-left: 3px solid #deb34a; background: #f7f3ef; color: #3a2a24; line-height: 1.5; }

.stage { border-top: 1px solid #ddd; padding: 16px 0; }
.stage:last-child { border-bottom: 1px solid #ddd; }
.stage-header { display: flex; align-items: flex-start; gap: 16px; }
.stage-header h2 { flex: 1; }
.stage-header h2 label { display: flex; align-items: flex-start; gap: 13px; cursor: pointer; }
.stage-header h2 input { width: 20px; height: 20px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #212123; cursor: pointer; }
.details-button { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; margin: -10px 0; border: 0; border-radius: 50%; background: transparent; color: #333; cursor: pointer; }
.details-button::before { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); transition: transform .15s ease; }
.details-button[aria-expanded="true"]::before { transform: translateY(3px) rotate(225deg); }
.details-button:hover { background: #f7f3ef; }
.details-button:focus-visible { outline: 3px solid #deb34a; outline-offset: 3px; }
.detail-content { padding: 4px 0 4px 33px; }
.detail-list { margin: 12px 0 20px; padding-left: 23px; line-height: 1.55; }
.detail-list li { margin: 8px 0; }
.choice-group { border: 1px solid #ddd; margin: 18px 0; padding: 12px 16px 16px; min-width: 0; }
.choice-group--plain { border: 0; padding: 0; margin: 12px 0; }
.choice-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); column-gap: 16px; align-items: start; }
.choice-group--plain .choice-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice-options > div { min-width: 0; }
.product-interests .choice-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.choice-group legend, .note-section h3 { font-size: 1rem; font-weight: 700; padding: 0 4px; }
.group-note { color: #555; font-size: .92rem; margin: 5px 0 12px; }
.choice { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0; line-height: 1.45; cursor: pointer; }
.choice input { width: 18px; height: 18px; flex: 0 0 auto; margin: 2px 0 0; accent-color: #212123; cursor: pointer; }
.text-field { display: block; margin: 16px 0; font-weight: 600; }
.text-field > span { display: block; margin-bottom: 7px; }
.text-field input:not([type="file"]), .text-field textarea, .text-field select { display: block; width: 100%; border: 1px solid #aaa; border-radius: 3px; padding: 9px 10px; background: #fff; color: #171717; font: inherit; font-weight: 400; }
.text-field textarea { resize: vertical; }
.customer-preferences { gap: 12px 18px; margin: 16px 0; }
.customer-preferences .text-field { display: flex; flex-direction: column; min-width: 0; margin: 0; }
.customer-preferences .text-field > span { flex: 1; }
.customer-preferences textarea { height: 64px; min-height: 64px; padding: 7px 10px; line-height: 1.4; }
.text-field input[type="file"] { display: block; max-width: 100%; font: inherit; font-weight: 400; }
.photo-upload-button { min-height: 44px; }
.photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.photo-actions .choice { margin: 0; }
.note-section > .group-note:empty { display: none; }
.choice-other-field { margin: 4px 0 12px 28px; }
.note-section { border: 1px solid #ddd; padding: 16px; margin: 18px 0; }
.note-section h3 { margin: 0 0 8px; padding: 0; }
.showroom-handoff { margin: 12px 0 0; }
.showroom-handoff .text-field { margin: 0 0 12px; }
.showroom-handoff-actions .form-message { margin: 8px 0 0; }
.showroom-handoff-actions .form-message:empty { display: none; }
.outcome-selector { border: 0; border-top: 1px solid #ddd; margin: 12px 0 0; padding: 22px 0 6px; }
.outcome-selector legend { padding: 0; font-size: 1.15rem; font-weight: 700; }
.outcome-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.outcome-options label { position: relative; display: block; min-width: 0; cursor: pointer; }
.departure-options { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 0; }
.outcome-options input { position: absolute; opacity: 0; }
.outcome-options span { display: grid; place-items: center; min-height: 48px; height: 100%; padding: 8px 12px; text-align: center; border: 1px solid #8f8076; border-radius: 6px; font-weight: 700; }
.outcome-options input:checked + span { border-color: #873c1e; background: #873c1e; color: #fff; }
.outcome-options input:focus-visible + span { outline: 3px solid #deb34a; outline-offset: 3px; }
.purchase-section .text-field { margin: 12px 0; }
.photo-row { display: flex; align-items: center; gap: 12px; border-top: 1px solid #eee; padding: 9px 0; overflow-wrap: anywhere; }
.photo-row img { width: 64px; height: 64px; object-fit: cover; flex: 0 0 auto; }
.photo-row span { flex: 1; min-width: 0; }
.remove-photo { border: 0; background: none; color: #333; padding: 6px 0; font: inherit; text-decoration: underline; cursor: pointer; }
.remove-photo:focus-visible { outline: 3px solid #deb34a; outline-offset: 3px; }

[hidden] { display: none !important; }
.visit-notices .form-message:empty { display: none; }

@media (max-width: 680px) {
  .site-header { align-items: center; flex-wrap: wrap; gap: 0; min-height: 56px; padding: 6px 16px; }
  .mobile-page-title { display: block; flex: 1; font-size: 1rem; font-weight: 700; }
  .new-visit-link { order: 1; width: 38px; height: 38px; margin-left: auto; margin-right: 6px; }
  .menu-toggle { order: 2; display: grid; place-content: center; gap: 5px; margin-left: 0; }
  .site-header > .top-nav, .site-header > .account-nav { display: none; }
  .site-header.menu-open > .top-nav { display: flex; flex: 1 1 100%; align-items: stretch; flex-direction: column; gap: 0; order: 3; padding-top: 6px; }
  .site-header.menu-open > .account-nav { display: grid; flex: 1 1 100%; gap: 0; order: 4; margin: 0; }
  .site-header.menu-open .top-nav a, .site-header.menu-open .account-nav button { display: flex; align-items: center; width: 100%; min-height: 44px; border-top: 1px solid #e8ddd5; padding: 8px 0; text-align: left; }
  .site-header.menu-open .top-nav a[aria-current="page"] { color: #873c1e; }
  .site-header.menu-open .current-user { max-width: none; padding: 10px 0 4px; overflow: visible; font-size: .9rem; text-overflow: clip; white-space: normal; }
  .customer-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "meta" "contacts" "actions"; }
  body[data-page="visitors"] .customer-card { grid-template-areas: "name" "meta" "attribution" "contacts" "actions"; }
  .card-actions { display: flex; margin-top: 10px; }
}

@media (max-width: 480px) {
  .outcome-options { gap: 6px; }
  .outcome-options span { padding: 8px 6px; font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
  main { padding-top: 30px; }
  .actions { align-items: stretch; }
  .actions .button { width: 100%; }
  .profile-grid { grid-template-columns: 1fr; }
  .customer-card { padding: 14px; }
  .page-heading-row { align-items: stretch; flex-direction: column; }
  .page-heading-row .button { width: 100%; text-align: center; }
  .stage-header { gap: 8px; }
  .detail-content { padding-left: 0; }
}

.transfer-options { margin-top: 12px; }

#customer-selection:empty { display: none; }
.customer-picker { margin-bottom: 12px; }
.linked-customer { margin-bottom: 16px; border: 1px solid #d8c6bb; border-radius: 6px; padding: 12px 14px; }
.customer-picker > label { display: block; font-size: .9rem; line-height: 1.4; font-weight: 700; }
.customer-picker input { width: 100%; min-height: 44px; padding: 8px 10px; margin-top: 6px; font: inherit; font-size: 1rem; border: 1px solid #8f8076; border-radius: 6px; box-sizing: border-box; }
.customer-picker-results { display: grid; gap: 6px; margin-top: 8px; }
.customer-picker-results:empty, .customer-picker > [role="status"]:empty { display: none; }
.customer-picker > [role="status"] { margin: 6px 0 0; font-size: .9rem; }
.customer-picker-results button { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.linked-customer p { margin: 6px 0; overflow-wrap: anywhere; }
.linked-customer .text-action { display: inline-block; margin-right: 14px; }

/* Read-only contact directory and in-memory visit selector. */
.eu-visit-contact-selector { margin: 1rem 0; padding: 1.25rem; border: 1px solid #d8c6bb; border-radius: 14px; background: #fff; }
.eu-visit-contact-selector h2 { margin: 0 0 .75rem; font-size: 1.15rem; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-search { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin: 1rem 0; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-search .text-field { flex: 1 1 240px; min-width: 0; margin: 0; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-search input { display: block; width: 100%; min-height: 44px; margin-top: .4rem; box-sizing: border-box; }
.eu-visit-contact-selector .button, .contact-directory .button { min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-results { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .6rem; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-results li { min-width: 0; }
.eu-visit-contact-selector .contact-selector-option { width: 100%; text-align: start; justify-content: flex-start; padding: .85rem 1rem; line-height: 1.5; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-option[aria-pressed="true"] { background: #f3e4dc; border-color: #873c1e; box-shadow: inset 3px 0 #873c1e; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-confirmation:not(:empty) { margin-top: 1rem; padding: 1rem; border: 1px solid #d8c6bb; border-radius: 10px; background: #f7f3ef; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-confirmation p { margin-top: 0; overflow-wrap: anywhere; }
.eu-visit-contact-selector [hidden], .contact-directory [hidden] { display: none !important; }
.eu-visit-contact-selector button:focus-visible, .eu-visit-contact-selector input:focus-visible,
.contact-directory button:focus-visible, .contact-directory input:focus-visible { outline: 3px solid #873c1e; outline-offset: 3px; }
.eu-visit-contact-saved, .eu-visit-contact-status, .contact-directory-card, .contact-directory-detail { overflow-wrap: anywhere; }
.contact-directory-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: .85rem; }
.contact-directory-card { min-width: 0; padding: 1rem; border: 1px solid #d8c6bb; border-radius: 12px; background: #fff; }
.contact-directory-card p { margin: .55rem 0; }
.contact-directory-detail:empty { display: none; }
@media (max-width: 520px) {
  .eu-visit-contact-selector { padding: 1rem; }
:where(.eu-visit-contact-selector, .contact-directory)   .contact-selector-search .text-field { flex-basis: 100%; }
:where(.eu-visit-contact-selector, .contact-directory)   .contact-selector-search .button { flex: 1 1 auto; }
:where(.eu-visit-contact-selector, .contact-directory)   .contact-selector-confirmation .button { width: 100%; }
}
.eu-visit-contact-selector button:disabled, .contact-directory button:disabled { opacity: .55; cursor: not-allowed; }
/* Compact contact search: a single entry with an anchored matching list. */
.eu-visit-contact-selector.contact-selector--compact { position: relative; padding: 0; margin: .75rem 0; border: 0; border-radius: 0; background: transparent; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-search { flex-wrap: nowrap; align-items: center; gap: .35rem; margin: 0; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-search .text-field { flex: 1 1 auto; min-width: 0; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-search input { margin: 0; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-clear { flex: 0 0 44px; width: 44px; padding: .25rem; font-size: 1.4rem; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-dropdown { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; max-height: min(360px, 50vh); overflow-y: auto; overscroll-behavior: contain; padding: .35rem; border: 1px solid #d8c6bb; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px #21212322; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-results { gap: .2rem; margin: 0; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-option { padding: .6rem .75rem; border: 0; background: #fff; color: #73321a; }
.eu-visit-contact-selector .contact-selector-option small { display: block; margin-top: .2rem; font-weight: 400; }
.eu-visit-contact-selector.contact-selector--compact .contact-selector-option:hover, .eu-visit-contact-selector.contact-selector--compact .contact-selector-option:focus-visible { background: #f3ebe5; }
.eu-visit-contact-selector.contact-selector--compact .eu-visit-contact-count { margin: .35rem .6rem; font-size: .8rem; color: #5f5048; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-chip { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .75rem; min-height: 44px; padding: .55rem .8rem; border: 1px solid #d8c6bb; border-radius: 8px; background: #f7f3ef; }
:where(.eu-visit-contact-selector, .contact-directory) .contact-selector-chip span { font-size: .9rem; }
.eu-visit-contact-selector.contact-selector--compact .eu-visit-contact-status { margin: .3rem 0; font-size: .85rem; }
.eu-visit-contact-selector.contact-selector--compact .eu-visit-contact-status:empty { display: none; }

.eu-visit-contact-selector input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }

/* Consultant login uses exactly the service login design (public/service-login.css):
   same Merlons brown card, inputs, button and consultant/service switch. Keep both in step. */
body.login-page { background: #f7f3ef; color: #212123; font: 17px "Mark GEO", Arial, Helvetica, sans-serif; }
body.login-page main { width: min(100% - 32px, 440px); max-width: none; margin: 60px auto; background: #fff; border: 1px solid #d8c6bb; border-radius: 16px; padding: 28px; box-shadow: 0 14px 36px #21212312; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
body.login-page h1 { font-size: 27px; line-height: normal; color: #212123; margin: .67em 0; }
body.login-page .form-stack { display: block; margin: 0; }
body.login-page .text-field { display: block; margin: 22px 0; }
body.login-page .text-field span { display: block; font-weight: 400; }
html:has(body.login-page) { background: #f7f3ef; }
body.login-page .text-field input:not([type="file"]), body.login-page .button { font: inherit; width: 100%; min-height: 48px; border: 1px solid #969268; border-radius: 8px; padding: 10px; margin-top: 8px; }
body.login-page .button { background: #873c1e; color: #fff; font-weight: 400; cursor: pointer; }
body.login-page .button:hover { background: #73321a; }
body.login-page .button:disabled { opacity: .6; cursor: wait; }
body.login-page .form-message { overflow-wrap: anywhere; color: #873c1e; margin: 12px 0 0; min-height: 0; }
body.login-page .form-message:empty { display: none; }
body.login-page a { color: #873c1e; }
body.login-page input:focus-visible, body.login-page .button:focus-visible { outline: 3px solid #deb34a; outline-offset: 3px; }
.login-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; border: 1px solid #d8c6bb; border-radius: 10px; background: #f7f3ef; }
.login-choice a { display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 8px 12px; border-radius: 7px; color: #873c1e; font-weight: 700; text-decoration: none; text-align: center; }
.login-choice a:hover { background: #fff; }
.login-choice a[aria-current="page"] { background: #873c1e; color: #fff; }
.login-choice a:focus-visible { outline: 3px solid #deb34a; outline-offset: 2px; }

/* ==========================================================================
   Merlons design system (2026-11-19). One compact, symmetric scale for every
   consultant page; matches the service app and sign-in pages. Rules use a
   :root prefix so they win over older page stylesheets loaded after this file.
   ========================================================================== */
:root {
  --m-brand: #873c1e; --m-brand-hover: #73321a; --m-brand-tint: #f3ebe5;
  --m-ink: #212123; --m-muted: #6b5b51; --m-line: #e8ddd5; --m-line-strong: #d8c6bb;
  --m-page: #f7f3ef; --m-surface: #fff; --m-focus: rgb(135 60 30 / .18);
  --m-r-sm: 8px; --m-r-lg: 12px; --m-control: 40px;
  --m-s1: 4px; --m-s2: 8px; --m-s3: 12px; --m-s4: 16px; --m-s5: 24px;
  --m-shadow: 0 1px 2px rgb(33 33 35 / .05), 0 1px 1px rgb(33 33 35 / .03);
  --m-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23873c1e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
}

/* Layout and type */
:root main { padding: var(--m-s5) 0 48px; }
:root h1 { font-size: 1.6rem; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 var(--m-s3); }
:root h2 { font-size: 1.05rem; line-height: 1.3; }
:root p { line-height: 1.5; }
:root .page-heading-row { margin-bottom: var(--m-s4); gap: var(--m-s3); }
:root .page-intro { margin: 0 0 var(--m-s4); font-size: .93rem; color: var(--m-muted); }
:root .actions { gap: var(--m-s2); margin: 0 0 var(--m-s4); }
:root .empty-state, :root .group-note, :root .progress { color: var(--m-muted); }

/* Header and menus */
:root .site-header { min-height: 56px; padding-block: var(--m-s2); }
:root .nav-grouped .top-nav { gap: 2px; }
:root .nav-grouped .top-nav > a, :root .nav-dropdown summary { min-height: 36px; padding: 6px 10px; border-radius: var(--m-r-sm); font-size: .93rem; }
:root .nav-dropdown__panel { top: calc(100% + 4px); padding: var(--m-s1); border-color: var(--m-line); border-radius: var(--m-r-lg); box-shadow: 0 10px 30px rgb(33 33 35 / .12), 0 2px 6px rgb(33 33 35 / .06); }
:root .nav-dropdown__panel a, :root .nav-dropdown__panel button { min-height: 36px; padding: 7px 10px; border-radius: 6px; font-size: .93rem; }
:root .new-visit-link { width: 36px; height: 36px; flex-basis: 36px; font-size: 1.35rem; }

/* Fields: one height, one radius, one label style */
:root .text-field { margin: var(--m-s3) 0; font-weight: 400; }
:root .text-field > span, :root .customer-picker > label { margin-bottom: 6px; color: var(--m-muted); font-size: .8rem; font-weight: 600; letter-spacing: .01em; }
:root :is(.text-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]), .text-field select, .text-field textarea, .customer-picker input, .contact-selector-search input, .visit-comments__form textarea, .analytics-filters select, .analytics-filters input, select) {
  min-height: var(--m-control); padding: 8px 12px; border: 1px solid var(--m-line-strong); border-radius: var(--m-r-sm);
  background-color: var(--m-surface); color: var(--m-ink); font: inherit; font-size: .95rem; line-height: 1.35; box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
:root :is(.text-field textarea, .visit-comments__form textarea) { min-height: 76px; }
:root :is(input, select, textarea):hover:not(:disabled):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { border-color: #c4ae9f; }
:root :is(input, select, textarea):focus-visible:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { outline: none; border-color: var(--m-brand); box-shadow: 0 0 0 3px var(--m-focus); }
:root :is(input, select, textarea)::placeholder { color: #a8988d; }
:root :is(input, select, textarea):disabled { background-color: var(--m-brand-tint); color: var(--m-muted); cursor: not-allowed; }

/* Dropdowns: native select with a branded chevron, same box as inputs */
:root select { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: var(--m-chevron); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; cursor: pointer; text-overflow: ellipsis; }
:root select[multiple] { padding-right: 12px; background-image: none; }
:root option { color: var(--m-ink); }

/* Checkboxes and radios */
:root :is(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; accent-color: var(--m-brand); }
:root .choice { margin: 6px 0; gap: 10px; }

/* Buttons: compact, one height, one radius */
:root .button { min-height: var(--m-control); padding: 8px 16px; border-radius: var(--m-r-sm); font-size: .93rem; font-weight: 600; line-height: 1.2; letter-spacing: .01em; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
:root .button-secondary { border-color: var(--m-line-strong); background: var(--m-surface); color: var(--m-brand); }
:root .button-secondary:hover { border-color: var(--m-brand); background: var(--m-brand-tint); }
:root .compact-button { min-height: 36px; padding: 6px 12px; }
:root .button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m-focus); }
:root .button:disabled { opacity: .55; cursor: not-allowed; }

/* Cards and grouped sections: one surface style */
:root :is(.search-panel, .profile-editor, .customer-card, .credential, .customer-context, .linked-customer, .note-section, .choice-group:not(.choice-group--plain), .eu-visit-contact-selector:not(.contact-selector--compact), .contact-directory-card) {
  border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: var(--m-surface); box-shadow: var(--m-shadow); padding: var(--m-s4);
}
:root .choice-group:not(.choice-group--plain), :root .note-section { margin: var(--m-s3) 0; }
:root .choice-group legend { padding: 0 6px; font-size: .9rem; }
:root .customer-list { display: grid; gap: var(--m-s2); margin: var(--m-s3) 0; }
:root .customer-card { margin: 0; column-gap: var(--m-s4); }
:root .profile-editor { margin-top: var(--m-s4); }
:root .profile-grid { gap: 0 var(--m-s3); }

/* Checklist stages: tight rows on a white sheet */
:root .stage { padding: var(--m-s3) 0; border-color: var(--m-line); }
:root .stage:last-child { border-color: var(--m-line); }
:root .detail-list { margin: var(--m-s2) 0 var(--m-s3); }
:root .detail-list li { margin: 4px 0; }
:root .details-button { width: 36px; height: 36px; flex-basis: 36px; margin: -6px 0; }
:root .outcome-selector { padding-top: var(--m-s4); border-color: var(--m-line); }
:root .outcome-options { gap: var(--m-s2); margin-top: var(--m-s2); }
:root .outcome-options span { min-height: 42px; padding: 6px 10px; border-color: var(--m-line-strong); border-radius: var(--m-r-sm); font-size: .9rem; font-weight: 600; }
:root .outcome-options label:hover span { border-color: var(--m-brand); }

/* Lists and history rows */
:root :is(.customer-row, .consultant-list li) { padding: 10px 0; border-color: var(--m-line); }
:root .event-history li { padding: 8px 0; border-color: var(--m-line); }
:root .event-history span { font-size: .85rem; }

@media (max-width: 680px) {
  :root main { padding-top: var(--m-s4); }
  :root h1 { font-size: 1.35rem; }
  :root .site-header { min-height: 52px; }
}

/* Page widths: list/dashboard pages align with the 1120px header; forms stay focused. */
:root main { width: min(100% - 32px, 1120px); }
:root body[data-page="checklist"] main { width: min(100% - 32px, 820px); }
:root main.narrow { width: min(100% - 32px, 440px); }

/* Collapsible sections: one card style and one brand chevron everywhere in pages. */
:root main details > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; font-weight: 600; }
:root main details > summary::-webkit-details-marker { display: none; }
:root main details > summary::before { content: ""; flex: 0 0 auto; width: 7px; height: 7px; margin: 0 4px 2px 2px; border-right: 1.6px solid var(--m-brand); border-bottom: 1.6px solid var(--m-brand); transform: rotate(-45deg); transition: transform .15s ease; }
:root main details[open] > summary::before { transform: rotate(45deg); margin-bottom: 4px; }
:root main details.form-stack { margin: 0 0 var(--m-s2); padding: var(--m-s3) var(--m-s4); border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: var(--m-surface); box-shadow: var(--m-shadow); }
:root main details.form-stack[open] > summary { margin-bottom: var(--m-s3); }
:root main > h2 { margin: var(--m-s5) 0 var(--m-s2); }
:root main section.form-stack, :root main form.form-stack { margin: var(--m-s3) 0 var(--m-s4); }

/* Analytics filters: controls bottom-aligned, button sized to content. */
:root .analytics-filters { gap: var(--m-s3); padding: var(--m-s4); border-color: var(--m-line); border-radius: var(--m-r-lg); background: var(--m-surface); box-shadow: var(--m-shadow); }
:root .analytics-filters .text-field { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
:root .analytics-presets button { min-height: 34px; padding: 6px 12px; border-color: var(--m-line-strong); border-radius: 999px; font-size: .88rem; transition: background-color .15s ease, border-color .15s ease; }
:root .analytics-presets button:hover { border-color: var(--m-brand); }
:root .analytics-filters .button { justify-self: start; align-self: end; min-height: var(--m-control); }
:root .customer-card :is(p, .customer-meta) { margin: 4px 0; }
:root .customer-card h2 { margin: 0 0 2px; }
:root .customer-contacts, :root .card-actions { gap: 6px 12px; margin-top: 6px; }
:root .visitor-comments-container { margin-top: 8px; }
:root :is(.search-panel, .profile-editor, .customer-card, .credential, .customer-context, .linked-customer, .note-section, .choice-group, .contact-directory-card, details.form-stack) > :last-child { margin-bottom: 0; }
:root :is(.search-panel, .customer-context, .linked-customer, .note-section, .contact-directory-card) > :first-child { margin-top: 0; }
:root .search-panel p { margin: var(--m-s2) 0 0; }

/* Sign-in card: identical numbers to public/service-login.css (one shared spec). */
html:has(body.login-page) { background: #f7f3ef; }
:root body.login-page { margin:0;background:#f7f3ef;color:#212123;font:15px/1.45 "Mark GEO",Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased; }
:root body.login-page main { width:min(100% - 32px,400px);margin:48px auto;padding:24px;background:#fff;border:1px solid #e8ddd5;border-radius:16px;box-shadow:0 10px 30px rgb(33 33 35 / .08),0 1px 2px rgb(33 33 35 / .04); max-width: none; }
:root body.login-page .login-choice { display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin:0 0 16px;border:1px solid #e8ddd5;border-radius:10px;background:#f7f3ef; }
:root body.login-page .login-choice a { display:flex;align-items:center;justify-content:center;min-height:38px;padding:6px 10px;border-radius:7px;color:#873c1e;font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;text-align:center;transition:background-color .15s ease; }
:root body.login-page .login-choice a:hover { background: #fff; }
:root body.login-page .login-choice a[aria-current="page"] { background: #873c1e; color: #fff; }
:root body.login-page .form-stack { display: block; margin: 0; }
:root body.login-page .text-field { display:block;margin:12px 0;color:#6b5b51;font-size:12px;font-weight:600;line-height:1.3;letter-spacing:.01em; }
:root body.login-page .text-field > span { display: inline; margin: 0; color: inherit; font: inherit; letter-spacing: inherit; }
:root body.login-page .text-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]) { display:block;width:100%;min-height:40px;margin:6px 0 0;padding:8px 12px;border:1px solid #d8c6bb;border-radius:8px;background:#fff;color:#212123;font:inherit;font-size:15px;font-weight:400;line-height:1.35;letter-spacing:0;box-shadow:none;transition:border-color .15s ease,box-shadow .15s ease; }
:root body.login-page .text-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):hover { border-color: #c4ae9f; }
:root body.login-page .text-field input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):focus-visible { outline:none;border-color:#873c1e;box-shadow:0 0 0 3px rgb(135 60 30 / .18); }
:root body.login-page .button { display:block;width:100%;min-height:40px;margin:16px 0 0;padding:8px 16px;border:1px solid #873c1e;border-radius:8px;background:#873c1e;color:#fff;font:inherit;font-size:14px;font-weight:600;line-height:1.2;cursor:pointer;transition:background-color .15s ease; }
:root body.login-page .button:hover { background: #73321a; }
:root body.login-page .form-message { margin:12px 0 0;color:#873c1e;font-size:13px;overflow-wrap:anywhere; min-height: 0; }
:root body.login-page .form-message:empty { display: none; }

/* Header bell + inbox dropdown (replaces the "შეტყობინებები" text link). */
:root .header-inbox { position: relative; order: 1; flex: 0 0 auto; margin-left: var(--m-s2); }
:root .header-bell { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--m-ink); text-decoration: none; transition: background-color .15s ease, color .15s ease; }
:root .header-bell:hover, :root .header-bell[aria-expanded="true"], :root .header-bell[aria-current="page"] { background: var(--m-brand-tint); color: var(--m-brand); }
:root .header-bell:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m-focus); }
:root .header-bell .notification-badge { position: absolute; top: 2px; right: 1px; display: grid; place-items: center; min-width: 17px; height: 17px; margin: 0; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; background: var(--m-brand); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
:root .header-inbox__panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: min(380px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto; overscroll-behavior: contain; padding: var(--m-s2); border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: #fff; box-shadow: 0 16px 40px rgb(33 33 35 / .16), 0 2px 6px rgb(33 33 35 / .06); }
:root .header-inbox__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; border-bottom: 1px solid var(--m-line); margin-bottom: var(--m-s1); }
:root .header-inbox__head a { font-size: .85rem; font-weight: 600; text-decoration: none; }
:root .header-inbox__panel .form-message:empty, :root .header-inbox__panel #notifications-status:empty { display: none; }
:root .header-inbox__panel .notifications-list { display: grid; gap: 2px; }
:root .header-inbox__panel #load-more-notifications { width: 100%; margin-top: var(--m-s2); }
@media (min-width: 901px) {
  :root .site-header.nav-grouped { gap: 4px; }
  :root .site-header.nav-grouped > .header-inbox { order: 3; margin-left: 4px; }
}
@media (max-width: 900px) {
  :root .site-header > .header-inbox { order: 1; margin: 0 2px 0 0; }
  :root .header-inbox__panel { position: fixed; top: 60px; right: 12px; left: 12px; width: auto; }
}

/* Clickable list cards: the whole card opens; no separate "open" text links. */
:root .is-clickable { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
:root .is-clickable:hover { border-color: var(--m-line-strong); box-shadow: 0 6px 18px rgb(33 33 35 / .08), 0 1px 2px rgb(33 33 35 / .05); }
:root .is-clickable:active { transform: translateY(1px); }
:root .card-title-link { display: inline; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
:root .card-title-link:hover { color: var(--m-brand); }
:root .card-title-link:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 3px var(--m-focus); }

/* Visit checklist modal (navigation.js). */
:root .visit-modal { width: min(880px, calc(100vw - 32px)); height: min(92dvh, 1100px); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 16px; background: var(--m-page); color: var(--m-ink); box-shadow: 0 30px 80px rgb(33 33 35 / .3); overflow: hidden; }
:root .visit-modal[open] { display: flex; flex-direction: column; animation: visit-modal-in .18s ease-out; }
:root .visit-modal::backdrop { background: rgb(33 33 35 / .45); backdrop-filter: blur(2px); }
@keyframes visit-modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
:root .visit-modal__bar { display: flex; align-items: center; gap: var(--m-s3); min-height: 52px; padding: 0 8px 0 18px; border-bottom: 1px solid var(--m-line); background: #fff; }
:root .visit-modal__title { flex: 1; font-size: 1rem; }
:root .visit-modal__full { font-size: .85rem; font-weight: 600; text-decoration: none; }
:root .visit-modal__close { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--m-ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
:root .visit-modal__close:hover { background: var(--m-brand-tint); color: var(--m-brand); }
:root .visit-modal__close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m-focus); }
:root .visit-modal__body { position: relative; flex: 1; min-height: 0; }
:root .visit-modal__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--m-page); }
:root .visit-modal__loading { position: absolute; inset: 0; display: none; place-items: center; margin: 0; color: var(--m-muted); }
:root .visit-modal__body.is-loading .visit-modal__loading { display: grid; }
:root .visit-modal__body.is-loading .visit-modal__frame { visibility: hidden; }
html:has(.visit-modal[open]) { overflow: hidden; }
@media (max-width: 680px) {
  :root .visit-modal { width: 100vw; height: 100dvh; border-radius: 0; }
  :root .visit-modal__bar { padding-left: 14px; }
}
/* Inside the modal the checklist has no site header of its own. */
html.is-embedded .site-header { display: none; }
html.is-embedded body main { padding-top: var(--m-s4); }

/* Notification cards (inbox dropdown and /notifications): compact, unread dot, pill actions. */
:root .notification-card { position: relative; gap: 4px; margin: 0 0 6px; padding: 10px 12px 10px 26px; border: 1px solid var(--m-line); border-radius: 10px; background: #fff; }
:root .notification-card--unread { border-left: 1px solid var(--m-line); background: #fffaf6; }
:root .notification-card--unread::before { content: ""; position: absolute; top: 15px; left: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--m-brand); }
:root .notification-card > strong { font-size: .9rem; }
:root .notification-card__body { font-size: .9rem; line-height: 1.4; }
:root .notification-card__meta { font-size: .78rem; color: var(--m-muted); }
:root .notification-card__actions { gap: 6px; margin-top: 2px; }
:root .notification-card__actions:empty { display: none; }
:root .notification-card__read { min-height: 28px; padding: 3px 10px; border: 1px solid var(--m-line-strong); border-radius: 99px; background: #fff; color: var(--m-brand); font-size: .78rem; font-weight: 600; text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
:root .notification-card__read:hover { border-color: var(--m-brand); background: var(--m-brand-tint); }
:root .notification-card__read:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m-focus); }
:root .notification-card__actions a { font-size: .8rem; font-weight: 600; text-decoration: none; }
:root .header-inbox__panel .notification-card:last-child { margin-bottom: 0; }
:root #notifications-status:empty { display: none; }

/* Sales / service switch at the very top (same markup and numbers in styles.css and service-workflow.css). */
.app-switch{position:relative;z-index:25;display:flex;justify-content:center;padding:6px 16px;background:#212123}
.app-switch__track{display:grid;grid-template-columns:1fr 1fr;gap:2px;width:min(100%,320px);padding:3px;border-radius:10px;background:rgb(255 255 255 / .1)}
.app-switch a{display:flex;align-items:center;justify-content:center;min-height:30px;padding:4px 12px;border-radius:7px;color:rgb(255 255 255 / .78);font-size:13px;font-weight:600;line-height:1.2;text-decoration:none;transition:background-color .15s ease,color .15s ease}
.app-switch a:hover{color:#fff;background:rgb(255 255 255 / .08)}
.app-switch a[aria-current="page"]{background:#873c1e;color:#fff}
.app-switch a:focus-visible{outline:none;box-shadow:0 0 0 3px rgb(222 179 74 / .6)}
html.is-embedded .app-switch{display:none}

/* Visit summary inside the visit modal (?view=summary, public/visit-summary.js). */
html.is-summary #session > :not(#visit-comments) { display: none !important; }
html.is-summary #visit-comments { margin-top: var(--m-s3); }
html.is-summary #welcome { display: none !important; }
:root .visit-summary { display: grid; gap: var(--m-s3); }
:root .visit-summary__loading, :root .visit-summary__empty { margin: var(--m-s4) 0; color: var(--m-muted); }
:root .visit-summary__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--m-s3); padding: var(--m-s4); border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: #fff; box-shadow: var(--m-shadow); }
:root .visit-summary__head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
:root .visit-summary__meta { margin: 4px 0 0; color: var(--m-muted); font-size: .85rem; }
:root .visit-summary__meta:empty { display: none; }
:root .visit-summary__group { padding: var(--m-s3) var(--m-s4); border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: #fff; }
:root .visit-summary__group h3 { margin: 0 0 var(--m-s2); color: var(--m-muted); font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: none; }
:root .visit-summary__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
:root .visit-summary__chips li { padding: 4px 10px; border-radius: 99px; background: var(--m-brand-tint); color: var(--m-brand-hover); font-size: .85rem; font-weight: 600; }
:root .visit-summary__facts { display: grid; gap: 6px; margin: 0; }
:root .visit-summary__chips + .visit-summary__facts { margin-top: var(--m-s3); }
:root .visit-summary__facts div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--m-s3); }
:root .visit-summary__facts dt { color: var(--m-muted); font-size: .85rem; }
:root .visit-summary__facts dd { margin: 0; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 520px) { :root .visit-summary__facts div { grid-template-columns: 1fr; gap: 0; } }

/* Phone app install button, install/notification banners and the notification switch
   (same look and texts as the service app). */
html { scrollbar-gutter: stable; }
:root .header-install { order: 1; display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; margin-left: auto; padding: 0; border: 1px solid var(--m-line); border-radius: 50%; background: #fff; color: var(--m-brand); cursor: pointer; }
:root .header-install[hidden] { display: none; }
:root .header-install:hover { background: var(--m-brand-tint); border-color: var(--m-brand); }
:root .header-install:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--m-focus); }
:root .header-install:not([hidden]) + .header-inbox { margin-left: 4px; }
@media (min-width: 901px) { :root .site-header.nav-grouped > .header-install { order: 3; margin-left: auto; } }
@media (max-width: 900px) { :root .site-header > .header-install { margin: 0 4px 0 auto; } }
:root .app-banners { width: min(100% - 24px, 1180px); margin: 10px auto 0; }
:root .app-banners:not(:has(.app-banner:not([hidden]))) { display: none; }
:root .app-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 12px; border: 1px solid var(--m-line); border-radius: var(--m-r-lg); background: #fbf6f2; color: var(--m-ink); font-size: 14px; line-height: 1.4; }
:root .app-banner[hidden] { display: none; }
:root .app-banner img { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; }
:root .app-banner__text { flex: 1 1 160px; min-width: 0; }
:root .app-banner__go { flex: 0 0 auto; width: auto; min-height: 36px; margin: 0; padding: 7px 14px; }
:root .app-banner__close { flex: 0 0 auto; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--m-ink); font-size: 22px; line-height: 1; cursor: pointer; }
:root .app-banner__close:hover { background: var(--m-brand-tint); }
@media (max-width: 720px) { :root .app-banner--install .app-banner__go { order: 4; flex: 1 1 100%; } }
:root .header-push { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: var(--m-s2); padding: 8px 6px 2px; border-top: 1px solid var(--m-line); color: var(--m-muted); font-size: 13px; }
:root .header-push:empty { display: none; }
:root .header-push .workflow-push-status { flex: 1 1 160px; }
:root .header-push .workflow-push-status:empty { display: none; }
:root .header-push button { min-height: 32px; padding: 6px 12px; border: 1px solid var(--m-line); border-radius: var(--m-r-sm); background: #fff; color: var(--m-ink); font-size: 13px; font-weight: 600; cursor: pointer; }
:root .header-push button:hover { border-color: var(--m-brand); color: var(--m-brand); }
:root .header-push button[hidden] { display: none; }
.app-switch a{gap:6px}
.app-switch__badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:99px;background:#d9534f;color:#fff;font-size:11px;font-weight:700;line-height:1}
.app-switch a[aria-current="page"] .app-switch__badge{background:#fff;color:#873c1e}

/* One top-bar standard for sales and service (same as service-workflow.css):
   full page width with 24px sides (12px on phones), 56px tall; section navigation centred;
   install, bell and the account menu (name ▾ → გასვლა) together at the far right. */
:root main { width: calc(100% - 48px); max-width: none; }
:root body[data-page="checklist"] main { width: calc(100% - 48px); }
:root main.narrow { width: min(100% - 32px, 440px); }
:root .app-banners { width: calc(100% - 48px); }
:root .site-header, :root .site-header.nav-grouped { position: relative; min-height: 56px; padding: 8px 24px; gap: 4px; }
:root .site-header > .account-nav { order: 9; flex: 0 0 auto; min-width: 0; margin: 0 0 0 4px; }
:root .nav-dropdown--account { flex: 0 0 auto; width: auto; }
:root .account-label { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
:root .account-avatar { display: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f3ebe5; color: #873c1e; font-size: 13px; font-weight: 700; }
:root .nav-dropdown--account .current-user { max-width: 160px; color: #212123; font-weight: 600; }
@media (min-width: 901px) {
  :root .site-header.nav-grouped > .top-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); flex: none; width: auto; max-width: calc(100% - 420px); }
  :root .site-header.nav-grouped > .header-install { order: 7; margin-left: auto; }
  :root .site-header.nav-grouped > .header-inbox { order: 8; margin-left: 4px; }
  :root .site-header.nav-grouped > .header-install[hidden] + .header-inbox { margin-left: auto; }
}
@media (max-width: 900px) {
  :root main, :root body[data-page="checklist"] main, :root .app-banners { width: calc(100% - 24px); }
  :root .site-header, :root .site-header.nav-grouped { padding: 8px 12px; }
  :root .site-header.nav-grouped > .mobile-page-title { order: 0; flex: 1 1 auto; }
  :root .site-header.nav-grouped > .new-visit-link { order: 1; margin: 0 2px 0 0; }
  :root .site-header.nav-grouped > .header-install { order: 2; margin: 0 2px; }
  :root .site-header.nav-grouped > .header-inbox { order: 3; margin: 0 2px; }
  :root .site-header.nav-grouped > .menu-toggle { order: 4; margin: 0 2px; }
  :root .site-header.nav-grouped > .account-nav { display: block; order: 5; margin: 0 0 0 2px; }
  :root .nav-dropdown--account > summary { padding: 3px; }
  :root .nav-dropdown--account > summary::after, :root .nav-dropdown--account .current-user { display: none; }
  :root .account-avatar { display: grid; }
  :root .site-header.nav-grouped .nav-dropdown--account .nav-dropdown__panel { position: absolute; right: 0; left: auto; min-width: 160px; padding: 4px; border: 1px solid #e8ddd5; border-radius: 12px; background: #fff; box-shadow: 0 10px 30px rgb(33 33 35 / .12); }
}
/* The account menu sizes to its own button (it was taking the whole row on phones). */
:root .site-header > .account-nav { width: max-content; max-width: 220px; }
:root .site-header > .account-nav > .nav-dropdown--account { display: block; width: max-content; max-width: 100%; }
@media (max-width: 900px) {
  :root .site-header > .account-nav { width: 36px; }
  :root .site-header.nav-grouped > .mobile-page-title { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 900px) {
  /* Icons always sit at the right, with or without a page title. */
  :root .site-header.nav-grouped { justify-content: flex-end; }
  :root .site-header > .account-nav { border: 0; padding: 0; }
}
