/* KBH_STAGE_147_UX_FEATURES_V1 */

/* ---------- okna ---------- */
.kbh7-modal { position: fixed; inset: 0; z-index: 100030; background: rgba(15,23,42,.42); display: grid; place-items: center; padding: 16px; }
.kbh7-modal.kbh7-top { align-items: start; padding-top: 10vh; }
.kbh7-card { background: var(--card, #fff); color: var(--fg, #1f2937); border-radius: 18px; box-shadow: 0 24px 64px rgba(15,23,42,.28); max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.kbh7-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 8px; }
.kbh7-head h3 { margin: 0; font-size: 17px; }
.kbh7-x { all: unset; cursor: pointer; font-size: 22px; line-height: 1; opacity: .55; padding: 2px 6px; }
.kbh7-x:hover { opacity: 1; }
.kbh7-body { padding: 4px 18px 18px; overflow: auto; }
.kbh7-f { display: block; margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.kbh7-f input:not([type=checkbox]):not([type=file]), .kbh7-f textarea { display: block; width: 100%; box-sizing: border-box; margin-top: 4px; padding: 9px 11px; font-weight: 400; font-size: 14px; }
.kbh7-att { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 6px 0; font-weight: 400; }
.kbh7-note { font-size: 12px; opacity: .7; margin: 4px 0; font-weight: 400; }
.kbh7-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---------- 22. wyszukiwarka (zastępuje dotychczasowe pole „Szukaj: nr zlecenia”) ---------- */
#topbar .global-search-wrap:has(#kbh7SearchBtn) .global-search-box { display: none !important; }
.kbh7-searchbtn {
  display: inline-flex; align-items: center; gap: 14px; justify-content: space-between;
  min-width: 300px; padding: 7px 10px 7px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border, rgba(0,0,0,.12)); background: var(--card, #fff); color: inherit; opacity: .9; font-size: 13px;
}
.kbh7-searchbtn:hover { opacity: 1; border-color: #f4b400; }
.kbh7-kbd { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--border, rgba(0,0,0,.15)); opacity: .7; }
.kbh7-search { width: 100%; box-sizing: border-box; font-size: 16px; padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; }
.kbh7-results { max-height: 56vh; overflow: auto; }
.kbh7-group { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; opacity: .55; padding: 10px 6px 4px; }
.kbh7-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.kbh7-row.sel, .kbh7-row:hover { background: rgba(244,196,0,.16); }
.kbh7-ico { font-size: 18px; width: 24px; text-align: center; }
.kbh7-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kbh7-txt b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbh7-txt small { opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbh7-type { font-size: 11px; opacity: .5; white-space: nowrap; }
.kbh7-mini { font-size: 12px !important; padding: 3px 9px !important; }
.kbh7-hint { padding: 18px 8px; opacity: .65; font-size: 14px; }
.kbh7-foot { display: flex; gap: 14px; font-size: 11.5px; opacity: .55; padding-top: 10px; border-top: 1px solid var(--border, rgba(0,0,0,.08)); margin-top: 8px; }
.kbh7-foot .kbh7-kbd { margin-left: auto; }

/* ---------- 23. NIP ---------- */
.kbh7-nipbtn { margin-top: 6px; font-size: 12px !important; padding: 4px 10px !important; }

/* ---------- 24. Czeka na mnie ---------- */
.kbh7-waiting { margin: 14px 0 6px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border, rgba(0,0,0,.08)); background: var(--card, #fff); box-shadow: 0 6px 20px rgba(15,23,42,.05); }
.kbh7-w-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.kbh7-w-head b { font-size: 15px; }
.kbh7-w-head span { font-size: 12.5px; opacity: .65; }
.kbh7-w-notif { margin-left: auto; font-size: 12.5px; font-weight: 700; text-decoration: none; }
.kbh7-w-sub { margin-top: 12px; }
.kbh7-w-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.kbh7-w-item { all: unset; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border, rgba(0,0,0,.08)); }
.kbh7-w-item:hover { background: rgba(244,196,0,.12); border-color: rgba(244,196,0,.6); }
.kbh7-w-item span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.kbh7-w-item b { font-size: 13.5px; font-weight: 600; }
.kbh7-w-item small { font-size: 12px; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbh7-w-ico { font-size: 20px; }
.kbh7-w-go { font-size: 20px; opacity: .4; }
.kbh7-w-more { font-size: 12px; opacity: .6; margin-top: 6px; }
.kbh7-recent { display: flex; flex-wrap: wrap; gap: 8px; }
.kbh7-recent button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border, rgba(0,0,0,.1)); max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbh7-recent button:hover { border-color: #f4b400; background: rgba(244,196,0,.1); }

/* ---------- 25. kopia ---------- */
.project-context-box .kbh7-copy { margin-left: 12px; font-size: 12px !important; padding: 4px 10px !important; }

/* ---------- 26/27. pasek i postęp ---------- */
.kbh7-bar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px;
  margin: 10px 0 14px; padding: 10px 16px; border-radius: 14px;
  background: var(--card, #fff); border: 1px solid var(--border, rgba(0,0,0,.08)); box-shadow: 0 8px 22px rgba(15,23,42,.07);
}
.kbh7-bar-item { display: inline-flex; flex-direction: column; font-size: 14px; gap: 1px; }
.kbh7-bar-item small { font-size: 11px; opacity: .6; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.kbh7-bar .kbh-save-state { margin-left: auto; flex-direction: row; align-self: center; }
.kbh7-meter { display: block; width: 140px; height: 5px; border-radius: 99px; background: rgba(100,116,139,.18); margin-top: 3px; overflow: hidden; }
.kbh7-meter i { display: block; height: 100%; background: linear-gradient(90deg, #f4b400, #16a34a); }
.kbh7-bar label.kbh7-todo { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 6px !important; font-size: 13px !important; cursor: pointer; white-space: nowrap; margin: 0 !important; width: auto !important; }
.kbh7-bar label.kbh7-todo input { width: 16px !important; height: 16px; margin: 0 !important; flex: 0 0 16px; }
.kbh7-prog { margin-left: auto; margin-right: 10px; font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(245,158,11,.16); color: #92400e; }
.kbh7-prog.full { background: rgba(22,163,74,.14); color: #166534; }
.kbh7-prog:empty { display: none; }
body.kbh7-todo-only #step3ParamsContainer .acc-item.kbh7-full,
body.kbh7-todo-only #step3ParamsContainer label.field.kbh7-done,
body.kbh7-todo-only #step3ParamsContainer .subgroupbox.kbh7-done { display: none !important; }

/* ---------- 29. ustawienia ---------- */
.kbh7-pref { grid-column: 1 / -1; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border, rgba(0,0,0,.1)); display: flex; flex-direction: column; gap: 4px; }
.kbh7-pref label { display: flex; align-items: center; gap: 8px; }
.kbh7-pref span { font-size: 12.5px; opacity: .75; }

/* ---------- 30. oferta ---------- */
.kbh7-offer-mail { font-weight: 700; }
