/* Wamy admin: page parts on top of AdminLab (overview blocks copied from A01) */
small { font-size: 15px; }
.todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.todo a, .todo > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .2rem .8rem; align-items: center; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color var(--ease), transform var(--ease); }
.todo a:hover { border-color: var(--brand); transform: translateY(-2px); }
.todo i.ic { grid-row: span 2; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; font-size: 1.2rem; }
.todo b { font-size: 26px; line-height: 1.1; }
.todo a > span, .todo > div > span { grid-column: 2; color: var(--muted); font-size: 15px; font-weight: 700; }
.todo .go { grid-row: 1 / 3; grid-column: 3; color: var(--muted); }
.t-info i.ic { background: var(--info-bg); color: var(--info); } .t-warn i.ic { background: var(--warn-bg); color: var(--warn); }
.t-bad i.ic { background: var(--danger-bg); color: var(--danger); } .t-brand i.ic { background: rgba(var(--brand-rgb), .1); color: var(--brand-ink); }
.r2 { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 22px); align-items: start; }
.r2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); align-items: start; }
.rank { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.rank li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; }
.rank .bar { grid-column: 1 / -1; height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.rank .bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.rank li > span:first-child { font-weight: 700; font-size: 15px; } .rank em { font-style: normal; color: var(--muted); font-size: 15px; }
.feed { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.feed li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: .7rem; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.feed li:first-child { border-top: 0; }
.feed li > span:last-child { min-width: 0; }
.feed small { display: block; color: var(--muted); font-size: 15px; }
.feed .tx { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini-t { width: 100%; border-collapse: collapse; font-size: 15px; }
.mini-t th, .mini-t td { padding: 9px 6px; text-align: start; border-top: 1px solid var(--line); vertical-align: middle; }
.mini-t th { color: var(--muted); font-weight: 800; border-top: 0; }
.box { margin-top: 0; }
.ad-content > * + * { margin-top: clamp(14px, 1.6vw, 22px); }
.who .av img { display: block; }
/* app cards */
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.appc { display: grid; gap: 14px; padding: 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.appc .top { display: flex; align-items: center; gap: 14px; }
.appc .lg { width: 56px; height: 56px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 16px; color: #fff; font-size: 24px; font-weight: 800; overflow: hidden; }
.appc .lg img { width: 100%; height: 100%; object-fit: cover; }
.appc .top > div { min-width: 0; flex: 1; }
.appc h3 { margin: 0; font-size: 19px; }
.appc .top small { color: var(--muted); }
.appc .facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.appc .facts > div { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.appc .facts dt { color: var(--muted); font-size: 15px; font-weight: 700; }
.appc .facts dd { margin: 0; font-size: 20px; font-weight: 800; }
.appc .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.appc .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.appc.off { opacity: .7; }
.appc.add { place-items: center; align-content: center; min-height: 260px; border-style: dashed; border-width: 2px; color: var(--brand-ink); text-decoration: none; text-align: center; cursor: pointer; background: transparent; font: inherit; }
.appc.add i { font-size: 2rem; }
.appc.add b { font-size: 18px; }
.appc.add span { color: var(--muted); }
/* one-time key box */
.keybox { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line); }
.keybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 15px; }
/* code samples */
.code { margin: 0; padding: 16px 18px; border-radius: 16px; background: #04121c; color: #e6f1f3; font: 15px/1.7 ui-monospace, Consolas, monospace; direction: ltr; text-align: left; overflow-x: auto; white-space: pre; }
.code .c { color: #8696a0; } .code .s { color: #7ee2b8; } .code .k { color: #93b4ff; }
.doc h2 { font-size: 20px; margin: 0 0 .3rem; }
.doc h3 { font-size: 17px; margin: 1.2rem 0 .4rem; }
.doc p, .doc li { color: var(--ink); }
.doc .ptbl { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.doc .ptbl th, .doc .ptbl td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: start; vertical-align: top; }
.doc .ptbl th { color: var(--muted); border-top: 0; }
.doc .ptbl code { white-space: nowrap; }
.method { display: inline-block; padding: 0 8px; border-radius: 8px; font: 800 15px ui-monospace, Consolas, monospace; direction: ltr; }
.method.post { background: rgba(var(--brand-rgb), .12); color: var(--brand-ink); } .method.get { background: var(--info-bg); color: var(--info); }
.ep { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); direction: ltr; justify-content: flex-end; }
.ep code { font-size: 15px; }
/* forms in boxes */
.hint { display: block; color: var(--muted); font-size: 15px; margin-top: 4px; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.colors label { position: relative; width: 40px; height: 40px; border-radius: 12px; cursor: pointer; }
.colors input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.colors label:has(input:checked) { outline: 3px solid var(--ink); outline-offset: 2px; }
.colors label:has(input:focus-visible) { outline: 3px solid rgba(var(--brand-rgb), .6); outline-offset: 2px; }
.preview-m { padding: 18px; border-radius: 18px; background: #e6f0ef; }
[data-bs-theme="dark"] .preview-m { background: #061520; }
.preview-m .bub { max-width: 420px; padding: 8px 12px 10px; border-radius: 0 10px 10px 10px; background: #fff; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); white-space: pre-wrap; line-height: 1.7; }
[dir="rtl"] .preview-m .bub { border-radius: 10px 0 10px 10px; }
[data-bs-theme="dark"] .preview-m .bub { background: #12293a; color: #e6f1f3; }
.preview-m .bub b.t { display: block; }
.preview-m .bts { max-width: 420px; margin-top: 2px; border-radius: 10px; background: #fff; overflow: hidden; }
[data-bs-theme="dark"] .preview-m .bts { background: #12293a; }
.preview-m .bts span { display: block; padding: 10px; border-top: 1px solid #e9edef; color: #027eb5; font-weight: 700; text-align: center; }
.preview-m .bts span:first-child { border-top: 0; }
.btn-rows { display: grid; gap: 10px; }
.btn-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
@media (max-width: 1199.98px) { .todo { grid-template-columns: repeat(2, minmax(0, 1fr)); } .r2, .r2e { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767.98px) { .btn-row { grid-template-columns: minmax(0, 1fr); } .appc .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 479.98px) { .todo { grid-template-columns: minmax(0, 1fr); } .apps { grid-template-columns: minmax(0, 1fr); } }
.tgl { position: relative; }
.utabs .tgl:has(input:checked) { border-color: var(--brand) !important; background: rgba(var(--brand-rgb), .08); }
.utabs .tgl:has(input:focus-visible) { outline: 3px solid rgba(var(--brand-rgb), .5); outline-offset: 2px; }
.keybox { min-width: 0; }
.keybox code { word-break: break-all; }
/* inbox: the conversation list beside the open conversation */
.ib { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: clamp(14px, 1.6vw, 22px); align-items: stretch; height: calc(100dvh - 210px); min-height: 520px; }
.ib > .box { margin-top: 0; padding: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ib-tools { display: grid; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.ib-tools .seg { flex-wrap: wrap; }
.ib-rows { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.ib-rows a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 72px; padding: 10px 12px; border-radius: 14px; color: var(--ink); text-decoration: none; }
.ib-rows a:hover { background: var(--surface-2); }
.ib-rows a[aria-current="true"] { background: rgba(var(--brand-rgb), .1); }
.ib .av { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: hsl(var(--h, 160) 45% 42%); color: #fff; font-weight: 800; font-size: 18px; }
.ib-rows .tx { display: grid; min-width: 0; }
.ib-rows .tx > b, .ib-rows .ln { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-rows .tx > small { color: var(--muted); }
.ib-rows .ln { color: var(--muted); font-size: 15px; }
.ib-rows .mt { display: grid; justify-items: end; gap: 4px; color: var(--muted); }
.ib-rows .cnt { min-width: 26px; padding: 0 .4rem; border-radius: 999px; background: var(--brand); color: #fff; font-size: 15px; font-weight: 800; text-align: center; line-height: 1.6; }
.ib-none { padding: 14px; margin: 0; }
.ib-empty { margin: auto; padding: 32px 24px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--muted); max-width: 460px; }
.ib-empty > i { font-size: 2.4rem; color: var(--brand-ink); }
.ib-empty p { margin: 0; }
.ib-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.ib-h > div { flex: 1; min-width: 0; }
.ib-h h2 { margin: 0; font-size: 18px; }
.ib-h small { color: var(--muted); overflow-wrap: anywhere; }
.ib-back { display: none; }
.ib-msgs { list-style: none; margin: 0; padding: 18px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; background: #e6f0ef; }
[data-bs-theme="dark"] .ib-msgs { background: #061520; }
.ib-msgs li { display: grid; gap: 2px; max-width: min(620px, 80%); }
.ib-msgs li.them { align-self: flex-start; justify-items: start; }
.ib-msgs li.us { align-self: flex-end; justify-items: end; }
.ib-msgs .bub { padding: 8px 12px 9px; border-radius: 0 12px 12px 12px; background: #fff; color: #111b21; box-shadow: 0 1px .5px rgba(11,20,26,.13); line-height: 1.75; overflow-wrap: anywhere; }
.ib-msgs li.us .bub { border-radius: 12px 0 12px 12px; background: #d9fdd3; }
[data-bs-theme="dark"] .ib-msgs .bub { background: #12293a; color: #e6f1f3; }
[data-bs-theme="dark"] .ib-msgs li.us .bub { background: #005c4b; }
.ib-msgs .bub .by { display: block; font-size: 15px; color: var(--brand-ink); }
[data-bs-theme="dark"] .ib-msgs .bub .by { color: #7ee2b8; }
.ib-msgs small { color: var(--muted); }
.ib-reply { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--line); }
.ib-reply textarea { flex: 1; min-width: 0; resize: vertical; min-height: 48px; max-height: 220px; }
.ib-reply .btx { min-height: 48px; }
.ib-blocked { margin: 0; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); }
@media (max-width: 991.98px) {
  .ib { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
  .ib.has-c .ib-list, .ib:not(.has-c) .ib-chat { display: none; }
  .ib-chat { height: calc(100dvh - 190px); min-height: 460px; }
  .ib-back { display: inline-grid; }
}
.ib-h small { display: block; }
.ib-h .btx-sm { min-width: 44px; min-height: 44px; }
