/* Trip Bagalil supplier portal, CRM style. Standalone page: no site header or footer. RTL native, mobile first.
   Contrast: white on --action is 5.3:1, ink on white 12:1, muted on white 5.9:1 (all above WCAG AA 4.5:1). */

@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: local('Heebo'), var(--heebo-hebrew) format('woff2'); unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; }
@font-face { font-family: 'Heebo'; font-weight: 100 900; font-display: swap; src: local('Heebo'), var(--heebo-latin) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }

:root {
	--ink: #063c30; --green: #07513d; --green-dark: #003e30; --muted: #45665e; --bg: #f4f8f6; --card: #fff;
	--border: #dae5df; --border-strong: #b7ccc4; --mint: #eefae8;
	--action: #b84f00; --action-hover: #9a4200; --orange: #ff7a05;
	--ok: #1d6f3a; --ok-bg: #e9f8e3; --warn: #8a4b00; --warn-bg: #fff3e0; --danger: #b42318; --danger-bg: #fdecea;
	--radius: 16px; --radius-pill: 999px; --shadow: 0 5px 24px rgba(13, 46, 36, .10);
	--font: 'Heebo', 'Arial Hebrew', 'Segoe UI', Arial, sans-serif;
	--side: 288px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.crm-body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--font); }
.crm-body a { color: var(--green); }
.crm-body :focus-visible { outline: 3px solid var(--green); outline-offset: 2px; box-shadow: 0 0 0 5px #fff; border-radius: 6px; }
.crm-skip { position: absolute; inset-inline-start: 8px; top: -60px; background: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.crm-skip:focus { top: 8px; }
.crm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---- buttons, chips, fields ---- */
.crm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: var(--radius-pill); border: 2px solid transparent; font: 700 16px/1 var(--font); cursor: pointer; text-decoration: none; transition: background-color .15s, border-color .15s; }
.crm-btn--primary { background: var(--action); color: #fff; }
.crm-btn--primary:hover { background: var(--action-hover); }
.crm-btn--ghost { background: #fff; color: var(--green); border-color: var(--border-strong); }
.crm-btn--ghost:hover { background: var(--mint); }
.crm-btn--danger { background: var(--danger); color: #fff; }
.crm-btn--danger:hover { background: #8f1c12; }
.crm-btn--block { width: 100%; }
.crm-btn svg, .crm-nav svg, .crm-link svg { width: 20px; height: 20px; flex: none; }
.crm-btn[disabled] { opacity: .55; cursor: not-allowed; }
.crm-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.crm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; background: var(--mint); color: var(--green); border: 1px solid var(--border); }
.crm-chip--ok { background: var(--ok-bg); color: var(--ok); border-color: #bfe8b0; }
.crm-chip--off { background: #eceff0; color: #3d4a47; border-color: #cfd6d3; }
.crm-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.crm-field { display: grid; gap: 6px; margin-bottom: 18px; }
.crm-field > label, .crm-field > .crm-label { font-weight: 700; }
.crm-field input[type=text], .crm-field input[type=email], .crm-field input[type=tel], .crm-field input[type=url], .crm-field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: #fff; color: var(--ink); font: 400 16px/1.5 var(--font); }
.crm-field textarea { min-height: 220px; resize: vertical; }
.crm-field input:focus, .crm-field textarea:focus { border-color: var(--green); }
.crm-field [aria-invalid=true] { border-color: var(--danger); background: var(--danger-bg); }
.crm-hint { font-size: 14px; color: var(--muted); margin: 0; }
.crm-hint--err { color: var(--danger); font-weight: 600; }
.crm-count { text-align: end; font-size: 14px; color: var(--muted); }
.crm-ltr { direction: ltr; text-align: right; }

/* ---- standalone cards (request, confirm, missing) ---- */
.crm-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.crm-card-center { width: min(520px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow); padding: 32px 28px; }
.crm-card-center img.crm-logo { display: block; width: 150px; height: auto; margin: 0 auto 18px; }
.crm-card-center h1 { font-size: 26px; line-height: 1.3; margin: 0 0 6px; text-align: center; }
.crm-card-center .crm-biz { text-align: center; color: var(--action); font-weight: 700; margin: 0 0 18px; }
.crm-trust { margin: 18px 0 0; padding: 12px 14px; background: var(--mint); border-radius: 12px; font-size: 14px; color: var(--green-dark); }

/* ---- messages ---- */
.crm-msg { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: #fff; font-weight: 500; }
.crm-msg--success { background: var(--ok-bg); border-color: #bfe8b0; color: #14522a; }
.crm-msg--error { background: var(--danger-bg); border-color: #f5c2bd; color: #7a1a12; }
.crm-msg--info { background: var(--mint); }

/* ---- app shell ---- */
.crm { display: grid; grid-template-columns: 1fr; min-height: 100vh; padding-bottom: 76px; }
.crm__side { display: none; }
.crm__top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--border); }
.crm__top h1 { margin: 0; font-size: 18px; line-height: 1.2; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm__top .crm-logo-sm { width: 44px; height: 44px; flex: none; }
.crm__topmeta { display: none; }
.crm__main { padding: 20px 16px 28px; max-width: 1100px; width: 100%; margin-inline: auto; }
.crm__tabs { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.crm__tabs button { min-height: 64px; border: 0; background: none; color: var(--muted); font: 600 12px/1.2 var(--font); display: grid; place-items: center; gap: 2px; cursor: pointer; padding: 6px 2px; }
.crm__tabs button svg { width: 24px; height: 24px; }
.crm__tabs button[aria-selected=true] { color: var(--green); background: var(--mint); box-shadow: inset 0 3px 0 var(--green); }
.crm-panel > h2 { font-size: 22px; margin: 0 0 4px; }
.crm-panel > .crm-sub { margin: 0 0 20px; color: var(--muted); }
.crm-grid { display: grid; gap: 16px; }
.crm-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.crm-card h3 { margin: 0 0 10px; font-size: 18px; }

/* ---- overview ---- */
.crm-stat { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crm-stat dl { margin: 0; display: grid; gap: 2px; }
.crm-stat dt { font-size: 14px; color: var(--muted); }
.crm-stat dd { margin: 0; font-weight: 700; }
.crm-progress { height: 12px; border-radius: 6px; background: #e3ece7; overflow: hidden; margin: 10px 0 14px; }
.crm-progress > span { display: block; height: 100%; background: var(--green); border-radius: 6px; }
.crm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.crm-todo li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 12px; }
.crm-todo li .crm-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.crm-todo li.is-done .crm-dot { background: var(--ok); color: #fff; }
.crm-todo li.is-open .crm-dot { background: #fff; border: 2px solid var(--action); color: var(--action); }
.crm-todo li span.crm-grow { flex: 1; }
.crm-todo button { border: 0; background: none; color: var(--green); font: 700 14px/1 var(--font); cursor: pointer; text-decoration: underline; padding: 8px; }

/* ---- listing preview card ---- */
.crm-prev { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff; max-width: 380px; }
.crm-prev__img { aspect-ratio: 3 / 2; background: linear-gradient(135deg, #d9e9db, #eefae8); display: grid; place-items: center; color: var(--muted); font-weight: 600; overflow: hidden; }
.crm-prev__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crm-prev__body { padding: 14px 16px 16px; }
.crm-prev__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.crm-prev__title { margin: 0 0 6px; font-size: 19px; line-height: 1.3; }
.crm-prev__text { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.crm-split { display: grid; gap: 20px; }
.crm-stickybar { position: sticky; bottom: 76px; z-index: 15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-top: 8px; background: #fff; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.crm-stickybar .crm-dirty { flex: 1; font-weight: 600; color: var(--warn); }

/* ---- photo ---- */
.crm-drop { display: grid; place-items: center; gap: 6px; text-align: center; padding: 26px 16px; border: 2px dashed var(--border-strong); border-radius: var(--radius); background: #fff; cursor: pointer; }
.crm-drop:hover, .crm-drop.is-over { background: var(--mint); border-color: var(--green); }
.crm-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.crm-drop:focus-within { outline: 3px solid var(--green); outline-offset: 2px; }
.crm-drop svg { width: 40px; height: 40px; color: var(--green); }
.crm-drop strong { font-size: 17px; }

/* ---- history ---- */
.crm-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.crm-timeline li { position: relative; padding: 0 28px 20px 0; }
.crm-timeline li::before { content: ''; position: absolute; inset-inline-start: auto; right: 6px; top: 8px; bottom: -4px; width: 2px; background: var(--border-strong); }
.crm-timeline li:last-child::before { display: none; }
.crm-timeline li::after { content: ''; position: absolute; right: 0; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 3px solid var(--mint); }
.crm-timeline time { display: block; font-size: 14px; color: var(--muted); }
.crm-timeline .crm-act { font-weight: 700; }
.crm-change { margin: 6px 0 0; padding: 8px 12px; background: #fff; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; }
.crm-change del { color: var(--danger); }
.crm-change ins { color: var(--ok); text-decoration: none; font-weight: 600; }
.crm-empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--radius); background: #fff; }

/* ---- help, danger ---- */
.crm-faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.crm-faq summary { cursor: pointer; font-weight: 700; }
.crm-faq p { margin: 8px 0 0; color: var(--muted); }
.crm-danger { border-color: #f5c2bd; background: #fffafa; }
.crm-danger h3 { color: var(--danger); }
dialog.crm-dialog { border: 0; border-radius: 20px; padding: 26px; width: min(460px, calc(100% - 32px)); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); color: var(--ink); font-family: var(--font); }
dialog.crm-dialog::backdrop { background: rgba(6, 60, 48, .55); }
dialog.crm-dialog h2 { margin: 0 0 8px; font-size: 22px; }
.crm-dialog__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---- desktop ---- */
@media (min-width: 960px) {
	.crm { grid-template-columns: var(--side) 1fr; padding-bottom: 0; }
	.crm__side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; padding: 22px 18px; background: #fff; border-inline-end: 1px solid var(--border); overflow-y: auto; }
	.crm__side .crm-logo { width: 150px; height: auto; display: block; }
	.crm-bizcard { padding: 14px; border-radius: 14px; background: var(--mint); border: 1px solid var(--border); }
	.crm-bizcard strong { display: block; font-size: 17px; line-height: 1.3; margin-bottom: 8px; }
	.crm-nav { display: grid; gap: 4px; }
	.crm-nav button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 12px; background: none; color: var(--ink); font: 600 16px/1 var(--font); text-align: start; cursor: pointer; }
	.crm-nav button:hover { background: var(--mint); }
	.crm-nav button[aria-selected=true] { background: var(--green); color: #fff; }
	.crm__side .crm-side-foot { margin-top: auto; display: grid; gap: 8px; }
	.crm__top { padding: 16px 32px; }
	.crm__top .crm-logo-sm { display: none; }
	.crm__top h1 { font-size: 22px; }
	.crm__topmeta { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
	.crm__main { padding: 28px 32px 40px; }
	.crm__tabs { display: none; }
	.crm-grid--2 { grid-template-columns: 1fr 1fr; }
	.crm-split { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
	.crm-split > aside { position: sticky; top: 96px; }
	.crm-stickybar { bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .crm-chip::before { background: CanvasText; } }
