/* Team lists, item comments/activity, notifications and templates. Uses app.css tokens (light + dark). */
.sc--gold { --sc: #c9a14e; } .sc--amber { --sc: #d9932b; } .sc--orange { --sc: #e0703a; } .sc--red { --sc: #cf4b3c; }
.sc--plum { --sc: #9a5ab5; } .sc--blue { --sc: #4a86c5; } .sc--teal { --sc: #2f9d93; } .sc--green { --sc: #4f9a55; }
.sc--slate { --sc: #6f7f91; } .sc--gray { --sc: #9a9284; }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: var(--sc, var(--gold)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc, var(--gold)) 22%, transparent); }
.sdot.sc--gold, .sdot.sc--amber, .sdot.sc--orange, .sdot.sc--red, .sdot.sc--plum, .sdot.sc--blue, .sdot.sc--teal, .sdot.sc--green, .sdot.sc--slate, .sdot.sc--gray { background: var(--sc); }
.back-row { margin: -8px 0 18px; }
.back-row .link-quiet { display: inline-flex; align-items: center; gap: 6px; }
.input--xs { padding: 6px 9px; font-size: 13px; border-radius: 9px; width: auto; min-width: 0; }
.btn--icon { padding: 6px; border-radius: 9px; }
.btn--icon .i { width: 16px; height: 16px; }
.avatar--xs { width: 24px; height: 24px; font-size: 12px; }
.empty--sm { padding: 36px 20px; }
.empty--sm .i { width: 40px; height: 40px; margin-bottom: 12px; }
.vis { display: inline-flex; align-items: center; gap: 5px; font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 5px 8px; border-radius: 999px; border: 1px solid var(--border); }
.vis .i { width: 12px; height: 12px; }
.vis--team { color: var(--gold); border-color: var(--border-strong); }
.vis--gold { color: var(--on-gold); background: var(--btn-grad); border-color: transparent; }

/* Index */
.new-list__head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.new-list__head .title { margin: 0; }
.new-list__form { display: grid; gap: 18px; }
.tpl-pick { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tpl-pick legend { margin-bottom: 8px; }
.tpl { position: relative; display: grid; gap: 8px; padding: 16px 18px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface-2); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.tpl input { position: absolute; opacity: 0; pointer-events: none; }
.tpl:hover { border-color: var(--gold); }
.tpl.is-on, .tpl:has(input:checked) { border-color: var(--gold); box-shadow: 0 0 0 3px var(--ring); background: linear-gradient(150deg, var(--gold-soft), transparent 60%), var(--surface); }
.tpl:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.tpl__name { font: 500 19px/1.2 var(--serif); }
.tpl__stages { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; font-size: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }
.stage-chip .sdot { width: 8px; height: 8px; box-shadow: none; }
.new-list__fields { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 14px; align-items: end; }
.list-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.list-card { display: grid; gap: 8px; height: 100%; padding: 22px; text-decoration: none; color: inherit; transition: border-color .2s ease, transform .2s ease; }
.list-card:hover { border-color: color-mix(in srgb, var(--gold) 50%, transparent); transform: translateY(-2px); }
.list-card__top { display: flex; gap: 6px; flex-wrap: wrap; }
.list-card__name { font: 500 22px/1.2 var(--serif); letter-spacing: -.01em; }
.list-card__stats { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text-2); }
.list-card__stats b { font-variant-numeric: tabular-nums; }

/* Toolbar */
.ltoolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ltabs { margin: 0; }
.ltabs .i { width: 15px; height: 15px; }
.lfilter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; }
.lfilter input[name=q] { min-width: 180px; }
.ltoolbar > .btn { margin-left: auto; }

/* Board */
.board { position: relative; display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x proximity; align-items: flex-start; }
.kcol { position: relative; flex: 0 0 272px; scroll-snap-align: start; display: grid; gap: 10px; padding: 12px; border-radius: var(--r); background: color-mix(in srgb, var(--surface-2) 85%, transparent); border: 1px solid var(--border); border-top: 3px solid var(--sc); }
.kcol--done { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.kcol__head { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.kcol__name { margin: 0; font: 600 13.5px/1.25 var(--sans); flex: 1; }
.kcol__count { font: 600 12px/1 var(--sans); color: var(--muted); padding: 4px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.kcol__done { color: var(--st-ap-dot); display: inline-flex; }
.kcol__done .i { width: 15px; height: 15px; }
.kcol__sum { margin: -4px 0 0; font-variant-numeric: tabular-nums; }
.kcol__items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-height: 12px; border-radius: 12px; transition: background-color .15s ease; }
.kcol__items.is-over { background: color-mix(in srgb, var(--sc) 14%, transparent); outline: 2px dashed color-mix(in srgb, var(--sc) 60%, transparent); outline-offset: 2px; }
.kcard { display: grid; gap: 8px; padding: 12px 13px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.05); cursor: grab; position: relative; }
.kcard:hover { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.kcard.is-dragging { opacity: .45; }
.kcard:target { box-shadow: 0 0 0 3px var(--ring); }
.kcard__title { color: var(--text); text-decoration: none; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.kcard__title:hover { color: var(--gold); }
.kcard__chef { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); }
.kcard__chef .i { width: 13px; height: 13px; color: var(--gold); }
.kcard__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kcard__meta .avatar { margin-left: auto; }
.kcard__count { display: inline-flex; align-items: center; gap: 3px; }
.kcard__count .i { width: 13px; height: 13px; }
.kcard__move { display: flex; gap: 6px; align-items: center; }
.kcard__move select { flex: 1; font-size: 12px; padding: 4px 8px; color: var(--muted); }
.js .kcard__move { display: none; }
.js .kcard:focus-within .kcard__move, .js .kcard:hover .kcard__move { display: flex; }
.js [data-nojs] { display: none; }
@media (hover: none) { .js .kcard__move { display: flex; } }
.kcol__add .input { width: 100%; background: transparent; border-style: dashed; }
.kcol__add .input:focus { background: var(--surface); border-style: solid; }
.due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text-2); padding: 3px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); white-space: nowrap; }
.due .i { width: 12px; height: 12px; }
.due--soon { background: var(--st-aw-bg); color: var(--st-aw-fg); border-color: transparent; }
.due--today { background: color-mix(in srgb, #e0703a 18%, var(--surface)); color: var(--st-cr-fg); border-color: color-mix(in srgb, #e0703a 40%, transparent); }
.due--overdue { background: var(--st-cr-bg); color: var(--st-cr-fg); border-color: color-mix(in srgb, var(--st-cr-dot) 40%, transparent); }
.due--done { opacity: .65; }
.amt { font: 600 12.5px/1 var(--sans); font-variant-numeric: tabular-nums; color: var(--gold); }
.amt--lg { font-size: 15px; }

/* List table */
.ltable { width: 100%; border-collapse: collapse; }
.ltable th, .ltable td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
.ltable thead th { background: var(--surface-2); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.ltable tbody tr:last-child td { border-bottom: 0; }
.ltable tbody tr:hover { background: var(--gold-soft); }
.ltable .num { text-align: right; font-variant-numeric: tabular-nums; }
.ltable__title { color: var(--text); font-weight: 500; text-decoration: none; }
.ltable__title:hover { color: var(--gold); }
.stage-select { display: inline-flex; align-items: center; gap: 8px; }
.who { display: inline-flex; align-items: center; gap: 8px; }

/* Add item / item form */
.add-item { margin-top: 22px; padding: 0; }
.add-item__toggle { display: flex; align-items: center; gap: 10px; padding: 18px 24px; cursor: pointer; font-weight: 500; list-style: none; color: var(--text-2); }
.add-item__toggle::-webkit-details-marker { display: none; }
.add-item__toggle .i { width: 18px; height: 18px; color: var(--gold); }
.add-item[open] .add-item__toggle { border-bottom: 1px solid var(--border); }
.add-item .item-form { padding: 22px 24px 24px; }
.item-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.item-form__wide { grid-column: 1 / -1; }
.item-form__bar { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; }
.item-form textarea { resize: vertical; }

/* Item page */
.item-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.item-main, .item-side { display: grid; gap: 22px; min-width: 0; }
.item-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.item-card__foot { margin: 16px 0 0; }
.stage-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: 13px; background: color-mix(in srgb, var(--sc) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sc) 45%, transparent); }
.activity-card .title { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.timeline__item { position: relative; padding: 0 0 16px 22px; }
.timeline__item::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: -2px; width: 1px; background: var(--border-strong); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--gold); }
.timeline__item--created .timeline__dot { background: var(--gold); }
.timeline__item--ghl_send .timeline__dot { background: var(--st-ap-dot); border-color: var(--st-ap-dot); }
.timeline__item--ghl_failed .timeline__dot { background: var(--st-cr-dot); border-color: var(--st-cr-dot); }
.timeline__what { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.timeline__who { color: var(--text); font-weight: 600; }
.timeline__what b { font-weight: 600; color: var(--text); }
.timeline__when { display: block; margin-top: 2px; }
.item-delete { display: flex; justify-content: flex-end; }

/* Settings */
.settings-card + .settings-card { margin-top: 22px; }
.settings-card .title { margin-top: 0; }
.stage-rows { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }
.stage-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-left: 4px solid var(--sc); border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.stage-row__order { display: flex; gap: 4px; }
.stage-row__order form, .stage-row__delete { margin: 0; }
.stage-row__form { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; margin: 0; }
.stage-row__form .input[name=name] { flex: 1; min-width: 150px; }
.stage-row__delete { display: flex; align-items: center; gap: 6px; }
.stage-add { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border); }
.stage-add .field:first-child { flex: 1; min-width: 180px; }
.stage-add .field:first-child .input { width: 100%; }

@media (max-width: 900px) {
  .item-layout { grid-template-columns: 1fr; }
  .new-list__fields { grid-template-columns: 1fr 1fr; }
  .new-list__fields .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 620px) {
  .tpl-pick { grid-template-columns: 1fr; }
  .new-list__fields, .item-form { grid-template-columns: 1fr; }
  .kcol { flex-basis: 82vw; }
  .ltoolbar > .btn { margin-left: 0; }
  .lfilter input[name=q] { min-width: 0; flex: 1 1 100%; }
  .ltable thead { display: none; }
  .ltable, .ltable tbody, .ltable tr, .ltable td { display: block; width: 100%; }
  .ltable tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .ltable td { border: 0; padding: 4px 0; }
  .ltable td.num { text-align: left; }
  .ltable td[data-label]:not([data-label="Item"])::before { content: attr(data-label); display: inline-block; min-width: 76px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .stage-row__form .input[name=name] { flex-basis: 100%; }
}

/* Topbar: one more nav item (Lists) + the bell; keep it on one line */
.nav__item { padding: 9px 12px; }
@media (max-width: 1800px) { .topbar__who { display: none; } }
@media (max-width: 1510px) { .nav__label { display: none; } .nav__item { padding: 9px 10px; } }
@media (max-width: 620px) {
  .topbar__inner { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 8px; row-gap: 6px; }
  .topbar .nav { order: 3; flex: 1 1 100%; margin: 0; justify-content: space-between; overflow-x: auto; scrollbar-width: none; }
  .topbar .nav::-webkit-scrollbar { display: none; }
  .topbar__actions { margin-left: auto; }
}

/* Comments */
.comments__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.comments__head .title { margin: 0; }
.comments__empty { margin: 0 0 14px; }
.comment-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 16px; }
.comment { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; scroll-margin-top: 90px; }
.comment:target .comment__main { box-shadow: 0 0 0 3px var(--ring); }
.avatar--sm { width: 32px; height: 32px; font-size: 14px; }
.comment__main { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.comment--mine .comment__main { background: linear-gradient(150deg, var(--gold-soft), transparent 70%), var(--surface-2); }
.comment__meta { margin: 0 0 4px; font-size: 13.5px; }
.comment__body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.comment__files { margin-top: 10px; }
.comment__actions { display: flex; gap: 14px; align-items: flex-start; margin-top: 8px; }
.comment__actions form { margin: 0; }
.comment__edit summary { cursor: pointer; list-style: none; }
.comment__edit summary::-webkit-details-marker { display: none; }
.comment__edit-form { display: grid; gap: 8px; margin-top: 8px; justify-items: end; }
.comment__edit[open] { flex: 1; }
.link-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.mention { color: var(--gold); font-weight: 600; background: var(--gold-soft); border-radius: 6px; padding: 0 3px; }
.comment-compose { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--border); }
.comment-compose textarea { resize: vertical; min-height: 84px; }
.mention-wrap { position: relative; }
.mention-menu { position: absolute; left: 12px; top: 100%; z-index: 5; list-style: none; margin: 4px 0 0; padding: 6px; min-width: 200px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.mention-menu__item { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.mention-menu__item.is-active, .mention-menu__item:hover { background: var(--gold-soft); color: var(--gold); }

/* ---------- Notifications (bell + page) ---------- */
.nav__item--icon { padding: 9px 11px; }
.nav__item--icon .nav__badge { position: absolute; top: 1px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; }
.notif-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 8px; }
.notif-col { display: grid; gap: 20px; min-width: 0; }
.notif-card { padding: 8px 0 6px; }
.notif-card__head { padding: 14px 22px 8px; margin: 0; align-items: center; }
.notif-card__head .title .muted { font: 500 14px/1 var(--sans); margin-left: 6px; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 22px; border-top: 1px solid var(--border); position: relative; }
.notif.is-unread { background: color-mix(in srgb, var(--gold-soft) 70%, transparent); }
.notif.is-unread::before { content: ''; position: absolute; left: 8px; top: 28px; width: 7px; height: 7px; border-radius: 50%; background: var(--btn-grad); }
.notif__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); border: 1px solid var(--border); }
.notif__icon .i { width: 18px; height: 18px; }
.notif--overdue .notif__icon { background: var(--st-cr-bg); color: var(--st-cr-fg); }
.notif--today .notif__icon { background: color-mix(in srgb, #e0703a 18%, var(--surface)); color: var(--st-cr-fg); }
.notif--soon .notif__icon { background: var(--st-aw-bg); color: var(--st-aw-fg); }
.notif--ok .notif__icon { background: var(--st-ap-bg, var(--gold-soft)); color: var(--st-ap-fg, var(--gold)); }
.notif--gold .notif__icon { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.notif__main { min-width: 0; display: grid; gap: 3px; }
.notif__open { margin: 0; }
.notif__title { all: unset; cursor: pointer; font-weight: 600; color: var(--text); line-height: 1.35; overflow-wrap: anywhere; }
.notif__title:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.notif__title:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.notif:not(.is-unread) .notif__title { font-weight: 500; color: var(--text-2); }
.notif__body { margin: 0; color: var(--text-2); overflow-wrap: anywhere; }
.notif__meta { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.notif__kind { color: var(--gold); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; align-self: center; }
.notif__toggle { margin: 0; }
.notif-empty { margin: 8px 22px 18px; padding: 40px 20px; }
.notif-prefs { padding: 22px; position: sticky; top: 90px; }
.notif-prefs .stack { display: grid; gap: 12px; margin-top: 14px; }
.notif-pref { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; cursor: pointer; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.notif-pref input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--gold-2); }
.notif-pref > span { display: grid; gap: 2px; }
@media (max-width: 960px) {
  .notif-layout { grid-template-columns: 1fr; }
  .notif-prefs { position: static; }
}
@media (max-width: 620px) {
  .notif { grid-template-columns: 32px minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .notif__icon { width: 32px; height: 32px; border-radius: 10px; }
  .notif__toggle { grid-column: 2; }
  .notif-card__head { padding: 12px 16px 6px; }
  .notif.is-unread::before { left: 5px; }
}

/* ---------- Message templates + Send via GoHighLevel ---------- */
.tpl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.tpl-col { min-width: 0; }
.tpl-col .section:first-child { margin-top: 0; }
.tpl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tpl-card { padding: 18px 20px; display: grid; gap: 8px; align-content: start; }
.tpl-card__top { display: flex; gap: 6px; flex-wrap: wrap; }
.tpl-card__name { font: 600 16px/1.3 var(--sans); margin: 2px 0 0; color: var(--text); }
.tpl-card__subject { margin: 0; color: var(--text-2); }
.tpl-card__body { margin: 0; color: var(--text-2); white-space: pre-line; overflow-wrap: anywhere; }
.tpl-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 4px; }
.tpl-empty { padding: 40px 20px; }
.tpl-new { padding: 22px; position: sticky; top: 90px; }
.tpl-edit { padding: 24px; max-width: 760px; }
.tpl-form { display: grid; gap: 14px; margin-top: 14px; }
.tpl-form__row { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; }
.tpl-form.is-sms .tpl-form__subject, .ghl-form.is-sms .ghl-subject { display: none; }
.tpl-form__bar, .ghl-form__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tpl-share { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; cursor: pointer; }
.tpl-share input { width: 17px; height: 17px; accent-color: var(--gold-2); }
.mfield { color: var(--gold); background: var(--gold-soft); border-radius: 5px; padding: 0 3px; font-weight: 600; }
.mfields { display: grid; gap: 6px; }
.mfields__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mchip { font: 500 12px/1 var(--mono, ui-monospace, monospace); padding: 6px 8px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent); background: var(--gold-soft); color: var(--gold); cursor: pointer; }
.mchip:hover { border-color: var(--gold); }
.ghl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 8px; }
.ghl-card, .ghl-preview { padding: 24px; display: grid; gap: 16px; min-width: 0; }
.ghl-preview { max-width: 720px; }
.ghl-card__head { display: flex; gap: 14px; align-items: center; }
.ghl-pick { display: flex; gap: 10px; align-items: end; }
.ghl-pick .field { flex: 1; }
.ghl-form { display: grid; gap: 14px; }
.ghl-chan { border: 0; padding: 0; margin: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.ghl-chan legend { margin-bottom: 6px; }
.ghl-chan__opt { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface-2); cursor: pointer; font-weight: 500; }
.ghl-chan__opt input { accent-color: var(--gold-2); margin: 0; }
.ghl-chan__opt .i { width: 17px; height: 17px; color: var(--gold); }
.ghl-chan__opt.is-on { border-color: var(--gold-2); box-shadow: 0 0 0 3px var(--gold-soft); }
.ghl-side { padding: 20px; }
.ghl-log { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.ghl-log__row { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.ghl-log__row p { margin: 0 0 2px; overflow-wrap: anywhere; }
.ghl-log__icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold); }
.ghl-log__icon .i { width: 15px; height: 15px; }
.ghl-log__row.is-failed .ghl-log__icon { background: var(--st-cr-bg); color: var(--st-cr-fg); }
.ghl-fail { color: var(--st-cr-fg); }
.ghl-to { margin: 0; display: grid; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.ghl-to > div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; }
.ghl-to dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.ghl-to dd { margin: 0; overflow-wrap: anywhere; }
.ghl-to__addr { color: var(--gold); font-weight: 600; }
.ghl-bubble { padding: 16px 18px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--surface); line-height: 1.55; overflow-wrap: anywhere; }
.ghl-bubble--sms { max-width: 420px; border-radius: 20px 20px 20px 6px; background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.ghl-confirm { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ghl-confirm form { margin: 0; }
.ghl-item { padding: 20px; display: grid; gap: 10px; margin-bottom: 18px; }
.ghl-item p { margin: 0; }
.ghl-item__form { display: grid; gap: 10px; }
.compose__tpl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.compose__tpl select { width: auto; min-width: 150px; max-width: 220px; }
.compose__ghl .i { width: 14px; height: 14px; }
@media (max-width: 1080px) { .tpl-layout, .ghl-layout { grid-template-columns: 1fr; } .tpl-new { position: static; } }
@media (max-width: 620px) {
  .tpl-form__row { grid-template-columns: 1fr; }
  .ghl-card, .ghl-preview, .tpl-new, .tpl-edit { padding: 18px; }
  .ghl-to > div { grid-template-columns: 1fr; gap: 2px; }
  .compose__tpl select { flex: 1; max-width: none; }
}
.compose__tpl [hidden] { display: none !important; }
