/* iBridge.az — biznes paneli */
html, body { height: 100%; }
body { background: var(--mist); }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.9rem; letter-spacing: -.02em; color: var(--aubergine); display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 14px; flex: none; }
.small { font-size: .85rem; color: var(--muted); }
.small a { color: var(--aubergine); }

/* giriş */
.auth { max-width: 440px; margin: 0 auto; padding: calc(36px + env(safe-area-inset-top)) 20px 40px; }
.auth .lead { margin: 6px 0 22px; font-size: 1.05rem; color: var(--muted); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--paper); border-radius: 999px; padding: 4px; margin-bottom: 18px; border: 1px solid var(--line); }
.tabs button { border: 0; background: none; padding: 10px; border-radius: 999px; font-weight: 600; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--aubergine); color: #fff; }
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: .92rem; font-weight: 600; }
.form input:not([type=checkbox]), .form select { border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px; background: var(--paper); font-size: 1rem; font-weight: 400; width: 100%; }
.form input:focus, .form select:focus { outline: none; border-color: var(--aubergine); }
.form .check { display: flex; align-items: center; gap: 10px; font-weight: 400; font-size: 1rem; }
.form .check input { width: 20px; height: 20px; accent-color: var(--aubergine); }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-size: .92rem; font-weight: 600; padding: 0; margin-bottom: 8px; }
.cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cats button { border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 12px 4px 9px; display: grid; justify-items: center; gap: 5px; font-size: .82rem; }
.cats button svg { width: 26px; height: 26px; }
.cats button[aria-pressed="true"] { border-color: var(--aubergine); background: var(--aubergine); color: #fff; }
.primary { border: 0; border-radius: 12px; background: var(--saffron); color: var(--ink); font-weight: 700; padding: 14px 18px; font-size: 1.02rem; }
.ghost { border: 1.5px solid var(--aubergine); border-radius: 12px; background: transparent; color: var(--aubergine); font-weight: 600; padding: 12px 18px; }
.ghost.red { border-color: var(--nar); color: var(--nar); }
.error { margin: 0; color: var(--nar); font-weight: 600; }

/* əsas */
.shell { height: 100dvh; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; background: var(--mist); }
.view { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
.bar { position: sticky; top: 0; z-index: 5; background: var(--aubergine); color: #fff; display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
.bar h1 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.bar .icon { border: 0; background: none; color: #fff; font-size: 1.9rem; line-height: 1; width: 40px; height: 40px; border-radius: 10px; }
.pad { padding: 18px 16px; }
.demo { background: var(--saffron); color: var(--ink); padding: 10px 16px; font-size: .9rem; }

.convs { list-style: none; margin: 0; padding: 0; }
.convs li button { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; text-align: start; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); padding: 13px 16px; }
.convs .lang { grid-row: span 2; min-width: 52px; text-align: center; background: var(--mist); border-radius: 10px; padding: 9px 6px; font-weight: 700; font-size: .82rem; color: var(--aubergine); }
.convs .name { font-weight: 700; }
.convs .when { font-size: .78rem; color: var(--muted); }
.convs .prev { color: var(--muted); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.convs .n { justify-self: end; min-width: 22px; height: 22px; border-radius: 11px; background: var(--nar); color: #fff; font-size: .78rem; font-weight: 700; display: grid; place-items: center; padding: 0 6px; }
.convs .off .name::after { content: " (bloklanıb)"; font-weight: 400; color: var(--muted); }
.convs .done .name::after { content: " (bitib)"; font-weight: 400; color: var(--muted); }
.empty { margin: auto; text-align: center; padding: 30px 26px; max-width: 380px; }

.chatview { overflow: hidden; }
.ctitle { flex: 1; min-width: 0; }
.ctitle b { display: block; }
.ctitle span { font-size: .84rem; opacity: .85; }
.menu { position: absolute; top: calc(100% - 4px); inset-inline-end: 10px; background: var(--paper); border-radius: 12px; box-shadow: 0 8px 28px rgba(27,19,38,.25); overflow: hidden; display: grid; min-width: 190px; }
.menu button { border: 0; background: none; padding: 14px 16px; text-align: start; color: var(--ink); }
.menu button + button { border-top: 1px solid var(--line); }
.closedbar { text-align: center; padding: 12px; background: var(--paper); border-top: 1px solid var(--line); color: var(--nar); font-weight: 600; }

.nav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--paper); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav button { position: relative; border: 0; background: none; padding: 9px 4px 8px; display: grid; justify-items: center; gap: 2px; font-size: .76rem; color: var(--muted); }
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--aubergine); font-weight: 700; }
.nav i { position: absolute; top: 7px; left: calc(50% + 8px); width: 10px; height: 10px; border-radius: 50%; background: var(--nar); }

/* stiker */
.sticker { background: var(--saffron); color: var(--ink); border-radius: 26px; padding: 22px 20px 18px; max-width: 340px; margin: 0 auto; text-align: center; }
.st-brand { font-family: var(--display); font-weight: 800; font-size: 1.7rem; letter-spacing: -.02em; color: var(--aubergine); }
.sticker img { display: block; width: 100%; max-width: 240px; height: auto; margin: 12px auto; border-radius: 14px; background: #fff; }
.st-name { font-weight: 700; font-size: 1.05rem; }
.st-langs { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 12px; font-size: .84rem; }
.link { text-align: center; font-size: .9rem; color: var(--muted); overflow-wrap: anywhere; }
.actions { display: grid; gap: 10px; max-width: 340px; margin: 0 auto 14px; }
.danger { display: grid; gap: 10px; border-top: 1px solid var(--line); margin-top: 6px; }

@media print {
  body * { visibility: hidden; }
  #sticker, #sticker * { visibility: visible; }
  #sticker { position: fixed; top: 10mm; left: 50%; transform: translateX(-50%); width: 90mm; max-width: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* qiymət təklifi */
#priceForm { display: grid; gap: 12px; }
.pricein { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--aubergine); border-radius: 14px; padding: 6px 16px; }
.pricein input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 2rem; font-weight: 800; background: none; padding: 6px 0; }
.pricein span { font-size: 1.8rem; font-weight: 800; color: var(--aubergine); }

.rating { margin: 0; padding: 14px 16px; background: var(--paper); border-bottom: 1px solid var(--line); font-weight: 700; color: var(--aubergine); }

/* restoran: menyu redaktoru */
.wide { width: 100%; }
.msec { margin: 0; padding: 14px 16px 6px; font-size: .9rem; color: var(--aubergine); font-weight: 800; }
.mrow { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: start; border: 0; border-bottom: 1px solid var(--line); background: var(--paper); padding: 12px 16px; }
.mrow .nm { font-weight: 700; }
.mrow .pr { font-weight: 800; }
.mrow .inf { grid-column: 1 / -1; font-size: .84rem; color: var(--muted); }
.mrow .inf .warn { color: var(--nar); font-weight: 600; }
.tagchecks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tagchecks label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .98rem; }
.tagchecks input { width: 20px; height: 20px; accent-color: var(--aubergine); }
.tablein { display: grid; gap: 6px; max-width: 340px; margin: 14px auto 0; font-size: .9rem; font-weight: 600; }
.tablein input { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 1rem; background: var(--paper); }
.st-table { font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--aubergine); margin-top: 4px; }

#hotelInfo { border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- geniş ekran (planşet, kompüter): menyu solda, siyahı və söhbət yan-yana ---------- */
.view.none { display: none; }
.convs li button.sel { background: #F3EDF7; box-shadow: inset 4px 0 0 var(--aubergine); }
@media (min-width: 900px) {
  .auth { margin-top: 6vh; background: var(--paper); border-radius: 22px; padding: 36px 32px 32px; box-shadow: 0 10px 40px rgba(27,19,38,.1); }
  .shell { max-width: none; display: grid; grid-template-columns: 96px minmax(300px, 380px) 1fr; grid-template-rows: minmax(0, 1fr); }
  .shell > .view { grid-row: 1; grid-column: 2 / 4; }
  .shell > #nav, .shell > #nav[hidden] { grid-row: 1; grid-column: 1; display: flex !important; flex-direction: column; gap: 4px; padding: 14px 8px; border-top: 0; background: var(--aubergine); }
  .nav::before { content: "K"; font-family: var(--display); font-weight: 800; font-size: 1.5rem; color: var(--ink); background: var(--saffron); width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 14px; }
  .nav button { color: rgba(255,255,255,.72); border-radius: 12px; padding: 10px 4px; font-size: .78rem; }
  .nav button:hover { background: rgba(255,255,255,.1); }
  .nav button[aria-current="page"] { background: rgba(255,255,255,.16); color: #fff; }
  .bar { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); min-height: 64px; padding-inline: 22px; }
  .bar h1 { color: var(--aubergine); font-size: 1.25rem; }
  .bar .icon { color: var(--ink); }
  #backBtn { display: none; }

  /* söhbətlər: siyahı solda qalır, sağda söhbət və ya «söhbət seçin» */
  .shell[data-view="list"] > #vList, .shell[data-view="chat"] > #vList, .shell[data-view="chat"] > #vList[hidden] { grid-column: 2; display: flex !important; border-inline-end: 1px solid var(--line); background: var(--paper); }
  .shell[data-view="chat"] > #vChat { grid-column: 3; }
  .shell[data-view="list"] > #vNone { grid-column: 3; display: flex; }
  #vList .empty .primary { margin-top: 6px; }
  .convs li button:hover { background: var(--mist); }
  .convs li button.sel:hover { background: #F3EDF7; }
  #vChat .msgs { padding: 22px max(22px, calc((100% - 860px) / 2)) 10px; }
  #vChat .chips { padding-inline: max(22px, calc((100% - 860px) / 2)); flex-wrap: wrap; }
  #vChat .composer { padding: 12px max(22px, calc((100% - 860px) / 2)) 16px; }

  /* QR, menyu, ayarlar: məzmun ortada */
  #vQr > .pad, #vMenu > .pad, #vMenu > #menuList, #vSet > form, #vSet > .pad, #vSet > .rating { width: 100%; max-width: 680px; margin-inline: auto; }
  #vMenu > #menuList { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 30px; background: var(--paper); }
  #vSet > .rating { border: 1px solid var(--line); border-radius: 14px; margin-top: 18px; }
  #vQr > .pad { display: grid; grid-template-columns: 340px 1fr; gap: 10px 36px; align-items: start; max-width: 820px; padding-top: 30px; }
  #vQr .sticker { grid-row: 1 / 6; margin: 0; }
  #vQr .tablein, #vQr .actions { margin: 0; max-width: none; }
  #vQr .link { text-align: start; margin: 0; }
}

/* ---------- qeydiyyat forması, şifrə, menyu şəkli, xidmət haqqı ---------- */
.form .hint { font-weight: 400; font-size: .84rem; color: var(--muted); }
.form .ferr { font-weight: 600; font-size: .86rem; color: var(--nar); }
.form input.bad { border-color: var(--nar); }
.pw { display: flex; gap: 8px; }
.pw input { flex: 1; min-width: 0; }
.pw .eye { flex: none; border: 1.5px solid var(--line); background: var(--paper); border-radius: 12px; padding: 0 12px; font-size: .86rem; font-weight: 600; color: var(--aubergine); }
.rules { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 400; font-size: .86rem; color: var(--muted); }
.rules span::before { content: "○ "; }
.rules span.ok { color: var(--ok); font-weight: 600; }
.rules span.ok::before { content: "✓ "; }
.pwform { border-top: 1px solid var(--line); }
.pwform h2 { margin: 0; font-size: 1.05rem; }
.menu button.red { color: var(--nar); }
.closedbar button { border: 0; background: none; color: var(--aubergine); text-decoration: underline; font-weight: 600; padding: 4px 6px; }
.svclist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.svclist label { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: .98rem; }
.svclist input { width: 20px; height: 20px; flex: none; accent-color: var(--aubergine); }
#hotelSvc { border-top: 1px solid var(--line); padding-top: 14px; }
.feebox { margin-top: 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.feebox .check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.feebox .check input { width: 20px; height: 20px; accent-color: var(--aubergine); }
.feerow { display: flex; gap: 10px; align-items: stretch; }
.pct { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--paper); }
.pct input { width: 4.5em; border: 0; outline: 0; font-size: 1.1rem; font-weight: 700; padding: 10px 0; background: none; }
.feebox .small { margin: 0; }
.mrow { grid-template-columns: auto 1fr auto; align-items: center; }
.mrow .ph { grid-row: span 2; width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--mist); }
.mrow .ph.none { display: grid; place-items: center; color: var(--muted); font-size: .7rem; }
.mrow .inf { grid-column: 2 / -1; }
.photo .photorow { display: flex; gap: 12px; align-items: center; }
.photo img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; background: var(--mist); flex: none; }
.photobtns { display: grid; gap: 8px; flex: 1; }
.filebtn { text-align: center; cursor: pointer; display: block; }
.photo .error { margin-top: 8px; }
@media (max-width: 420px) { .svclist { grid-template-columns: 1fr; } }
@media (min-width: 900px) { #vSet > .pwform { width: 100%; max-width: 680px; margin-inline: auto; } }

/* ---------- çərçivə: yuxarıda xəbərdarlıqlar, altında panel ---------- */
.frame { height: 100dvh; display: flex; flex-direction: column; }
.frame > .shell { flex: 1; min-height: 0; height: auto; width: 100%; }
.notices { flex: none; }
.notice { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 9px 16px; font-size: .92rem; text-align: center; background: var(--saffron); color: var(--ink); }
.notice.red { background: var(--nar); color: #fff; }
.notice.dark { background: var(--ink); color: #fff; }
.notice.info { background: #E7DDF0; color: var(--ink); }
.notice button { flex: none; border: 0; background: rgba(0,0,0,.14); color: inherit; border-radius: 8px; padding: 4px 10px; font-weight: 600; font-size: .84rem; }
.lock h1 { font-family: var(--display); font-size: 1.5rem; margin: 18px 0 8px; color: var(--ink); }
.paybox { background: var(--mist); border-radius: 16px; padding: 16px 18px; margin: 16px 0; }
.paybox b { font-size: 1.3rem; }
.paybox p { margin: 8px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.subcard { background: var(--paper); border-bottom: 1px solid var(--line); display: grid; gap: 4px; }
.subcard b { font-size: 1.05rem; }
.subcard .st { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: .8rem; font-weight: 700; background: #DDF1E5; color: var(--ok); margin-inline-start: 6px; }
.subcard .st.warn { background: var(--saffron); color: var(--ink); } .subcard .st.bad { background: #FBE3E6; color: var(--nar); }
.subcard p { margin: 0; color: var(--muted); font-size: .92rem; white-space: pre-line; }
.pushbox { border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.pushbox h2, .phr h2 { margin: 0; font-size: 1.05rem; }
.pushbox .small { margin: 0; }
.pushbtns { display: flex; gap: 8px; flex-wrap: wrap; }
.phr h2 { margin-top: 22px; }
.phr .small { margin: 4px 0 10px; }
.phrlist { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.phrrow { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.phrrow:last-child { border-bottom: 0; }
.phrrow label { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.phrrow input { width: 20px; height: 20px; flex: none; accent-color: var(--aubergine); }
.phrrow span { overflow-wrap: anywhere; }
.phrrow.off span { color: var(--muted); text-decoration: line-through; }
.phrrow em { font-style: normal; font-size: .76rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; flex: none; }
.phrrow button { flex: none; border: 0; background: none; color: var(--nar); font-weight: 600; padding: 4px 6px; }
.phradd { display: flex; gap: 8px; margin-top: 10px; }
.phradd input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 14px; background: var(--paper); font-size: 1rem; }
.phradd input:focus { outline: none; border-color: var(--aubergine); }
.nav button { font-size: .72rem; }
@media (min-width: 900px) {
  .frame > .shell { grid-template-rows: minmax(0, 1fr); }
  #vPhr > .pad { width: 100%; max-width: 680px; margin-inline: auto; }
  #vSet > .subcard, #vSet > .pushbox { width: 100%; max-width: 680px; margin-inline: auto; border: 1px solid var(--line); border-radius: 14px; margin-top: 18px; }
}

.checking { margin: 0; background: #E7DDF0; border-radius: 12px; padding: 12px 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.checking::before { content: ""; width: 16px; height: 16px; flex: none; border-radius: 50%; border: 3px solid var(--aubergine); border-top-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .checking::before { animation: none; } }
.subcard .ghost { justify-self: start; margin-top: 6px; }

/* onlayn vəziyyət */
.convs .name .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2FBF71; margin-inline-start: 7px; vertical-align: middle; }
.ctitle span.on { color: #B9F5C8; opacity: 1; }
/* açıq girişlər (cihazlar), təklif və iradlar, menyu bölmələri */
.sessbox h2, .fbform h2, .secbox h2 { font-size: 1.05rem; margin: 0 0 6px; }
.fbform { gap: 8px; } .fbform .small { margin: 0; }
.sessbox, .fbform, .secbox { border-top: 8px solid var(--mist); }
.sesslist { display: grid; gap: 8px; margin: 10px 0 12px; }
.sess { display: flex; gap: 12px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.sess.cur { border-color: var(--aubergine); }
.sess > div { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sess b { font-size: .98rem; }
.sess b .st { margin-inline-start: 8px; font-size: .72rem; font-weight: 700; background: var(--aubergine); color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.sess span { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.sess span.on { color: #1E8A4F; }
.sess button { flex: none; padding: 8px 12px; font-size: .88rem; }
.fbform textarea { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; font: inherit; background: var(--paper); width: 100%; resize: vertical; min-height: 96px; }
.seclist { display: grid; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); overflow: hidden; }
.secrow { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.secrow:last-child { border-bottom: 0; }
.secrow span { flex: 1; min-width: 0; font-weight: 600; }
.secrow em { font-style: normal; font-size: .84rem; color: var(--muted); }
.secrow button { border: 0; background: none; color: var(--nar); font-weight: 600; padding: 6px 4px; }
.seclist > .small { margin: 0; padding: 12px 14px; }
