/* CollHub - favourites, tags and stars, organisation chart, roles and permission grid, support. */

/* ---- sidebar favourites ---- */
.sb-fav { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.07); overflow-y: auto; min-height: 0; }
.sb-fav-group { display: flex; flex-direction: column; gap: 1px; }
.sb-fav-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: #7f8e9c; padding: 0 8px 4px 12px; }
.sb-fav-manage { background: none; border: 0; color: #7f8e9c; padding: 2px 5px; border-radius: 5px; cursor: pointer; }
.sb-fav-manage:hover { color: #fff; background: rgba(255,255,255,.08); }
.sb-fav { --fa-secondary-opacity: .45; }
.sb-fav-group > button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: #cfd7df; text-align: left; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; }
.sb-fav-group > button:hover { background: rgba(255,255,255,.06); color: #fff; }
.sb-fav-group > button.is-active { background: rgba(31, 111, 139, .35); color: #fff; }
.sb-fav-group > button > i { width: 20px; text-align: center; color: #f0c27f; }
.sb-fav-group > button > span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-fav-empty { font-size: 12px; color: #6f7d8b; padding: 2px 12px 4px; }
.fav-dot { width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center; }
.fav-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px rgba(255,255,255,.15); }
.fav-toggle { color: var(--muted); }
.fav-toggle.is-on { color: #e0a100; }
.person-fav { margin-left: auto; align-self: flex-start; }
.fav-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.fav-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 6px; }
.fav-row > i { color: var(--primary); }
.fav-row small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.fav-add { border-top: 1px solid var(--line); padding-top: 12px; }
.input-sm { padding: 5px 8px; font-size: 13px; }

/* ---- impersonation banner ---- */
.imp-banner { display: flex; align-items: center; gap: 10px; background: #8e2c48; color: #fff; padding: 8px 18px; font-weight: 600; font-size: 13px; }
.imp-banner i { font-size: 16px; }

/* ---- tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab:hover { text-decoration: none; color: var(--primary); }
.tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.tab i { --fa-secondary-opacity: .4; }

/* ---- tags and stars ---- */
.tag-chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 35%, #fff); white-space: nowrap; }
.tag-chip i { font-size: 10px; }
.tag-chip button { background: none; border: 0; color: inherit; padding: 0 2px; cursor: pointer; opacity: .7; }
.tag-chip button:hover { opacity: 1; }
.stars { display: inline-flex; gap: 1px; color: #e0a100; font-size: 11.5px; }
.stars .fa-regular { color: #d8d2c4; }
.star-input { display: inline-flex; align-items: center; gap: 2px; }
.star-input button { background: none; border: 0; padding: 2px 3px; font-size: 20px; color: #cfc8b8; cursor: pointer; }
.star-input button.is-on { color: #e0a100; }
.star-input button:hover { transform: scale(1.12); }
.star-input small { margin-left: 8px; color: var(--muted); }
.doc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.docs-name > div { display: flex; flex-direction: column; min-width: 0; }
.docs-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 10px; }
.docs-filter-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.docs-stars-filter { width: auto; }
.check.small { font-size: 12.5px; color: var(--ink-2); }
.docs-tags { flex-direction: row !important; flex-wrap: wrap; gap: 5px !important; padding: 0 4px; }
.docs-tag { --c: var(--muted); display: inline-flex; align-items: center; gap: 5px; background: #fff; border: 1px solid var(--line); color: var(--c); border-radius: 20px; padding: 3px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.docs-tag small { color: var(--muted); font-weight: 600; }
.docs-tag:hover { border-color: var(--c); }
.docs-tag.is-active { background: var(--c); color: #fff; border-color: var(--c); }
.docs-tag.is-active small { color: rgba(255,255,255,.8); }
.docs-tree .docs-folder { padding-left: calc(6px + var(--depth, 0) * 16px); }
.tree-toggle { width: 16px; flex: 0 0 16px; background: none; border: 0; padding: 0; color: var(--muted); font-size: 10px; cursor: pointer; }
.docs-folder-star { color: #e0a100 !important; font-size: 10px; width: auto !important; }
.crumbs { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.crumbs button { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--primary); cursor: pointer; }
.crumbs button:hover { text-decoration: underline; }
.crumbs > i { font-size: 10px; color: var(--muted); }
.docs-heading { flex-wrap: wrap; }
.folder-meta { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.folder-actions { display: inline-flex; gap: 4px; align-items: center; margin-left: 8px; }
.folder-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; }
.folder-cards-title { grid-column: 1 / -1; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.folder-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; box-shadow: var(--shadow-sm); }
.folder-card:hover { border-color: var(--primary); }
.folder-card > i { font-size: 26px; color: var(--warning); --fa-secondary-opacity: .4; }
.folder-card > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.folder-card small { color: var(--muted); font-size: 12px; }
.folder-card-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 3px; }
.tag-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.tag-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.input-color-sm { height: 34px; }
.tag-new { display: grid; grid-template-columns: minmax(0, 1fr) 90px auto; gap: 10px; align-items: end; border-top: 1px solid var(--line); padding-top: 12px; }
.tag-new .field { margin-bottom: 0; }

/* ---- people: filters, departments, roles ---- */
.people-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.people-filters .select { width: auto; min-width: 180px; }
.dept-chip { --c: var(--primary); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 20px; color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); }
button.dept-chip { cursor: pointer; }
.dept-chip i { font-size: 10px; }
.person-depts { display: flex; flex-wrap: wrap; gap: 5px; }
.role-badge { --c: var(--muted); color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border-color: transparent; }
.org-pick { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.org-pick-row { display: flex; align-items: center; gap: 14px; padding-left: calc(var(--depth, 0) * 18px); }
.org-pick-row > .check:first-child { flex: 1; font-weight: 600; }
.org-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 4px 12px; }
.org-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.org-tree .card-body { display: flex; flex-direction: column; gap: 2px; padding: 8px; }
.org-node { --c: var(--primary); display: flex; align-items: center; gap: 8px; background: none; border: 0; border-radius: 8px; padding: 8px 10px 8px calc(10px + var(--depth, 0) * 18px); text-align: left; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.org-node:hover { background: var(--surface-2); }
.org-node.is-active { background: var(--primary-50); color: var(--primary); }
.org-node.is-inactive { opacity: .55; }
.org-node small { color: var(--muted); margin-left: auto; }
.org-node .org-name small { margin-left: 4px; font-weight: 600; }
.org-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: 0 0 10px; }
.org-dot.big { width: 14px; height: 14px; flex-basis: 14px; }
.card-head .spacer { flex: 1; }
.org-path { margin-bottom: 8px; }
.org-sub { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.org-h { margin: 14px 0 8px; font-size: 14px; }
.org-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.org-member { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; flex-wrap: wrap; }
.org-member > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.org-member small { color: var(--muted); font-size: 12px; }
.grid-table { width: 100%; border-collapse: collapse; }
.grid-table th { text-align: left; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.grid-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table .num { text-align: right; }
.grid-table .row-actions { text-align: right; white-space: nowrap; }
.grid-table tr.is-inactive { opacity: .55; }
.grid-table tr.is-link { cursor: pointer; }
.grid-table tr.is-link:hover { background: var(--surface-2); }
.org-jobs-card .card-body { padding: 4px 8px; }

.roles-info { display: flex; gap: 12px; align-items: flex-start; background: var(--primary-50); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; color: var(--ink-2); font-size: 13px; }
.roles-info > i { font-size: 20px; color: var(--primary); margin-top: 2px; }
.perm-wrap { overflow-x: auto; }
.perm-grid { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 720px; }
.perm-grid th, .perm-grid td { border-bottom: 1px solid var(--line); padding: 8px 10px; }
.perm-grid thead th { position: sticky; top: 0; background: var(--surface); z-index: 1; vertical-align: bottom; }
.perm-name { text-align: left; font-weight: 600; min-width: 280px; }
.perm-name span { display: block; }
.perm-name small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.perm-role { --c: var(--muted); min-width: 120px; text-align: center; border-top: 4px solid var(--c); }
.perm-role-head { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.perm-role-head small { color: var(--muted); font-weight: 400; font-size: 11.5px; }
.perm-role-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.perm-grid td { text-align: center; }
.perm-grid input[type=checkbox] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--success); }
.perm-grid input[type=checkbox]:disabled { cursor: not-allowed; }
.perm-module th, .perm-module td { background: var(--surface-2); }
.perm-module th { text-align: left; font-size: 12.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-2); }
.perm-module th i { color: var(--primary); margin-right: 6px; }
.perm-grid tbody tr:not(.perm-module):hover td, .perm-grid tbody tr:not(.perm-module):hover th { background: #fbfaf7; }

/* ---- support ---- */
.sp-thread .card-body { display: flex; flex-direction: column; gap: 10px; }
.sp-desc, .sp-msg { border-radius: var(--radius); padding: 10px 14px; max-width: 760px; }
.sp-desc { background: var(--surface-2); border: 1px solid var(--line); }
.sp-msg.is-ours { background: var(--primary-50); align-self: flex-end; }
.sp-msg.is-staff { background: #fff7ec; border: 1px solid #f1dcc0; }
.sp-msg-who { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.sp-msg-body { white-space: normal; line-height: 1.5; }
.sp-wait { font-size: 12.5px; color: #9a6503; }
.sp-wait.is-failed { color: var(--danger); }
.sp-atts { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-reply { border-top: 1px solid var(--line); padding: 14px 16px; }
.sp-reply-actions { display: flex; gap: 8px; align-items: center; }
.sp-reply-actions .spacer { flex: 1; }

@media (max-width: 900px) {
    .org-layout { grid-template-columns: 1fr; }
    .fav-row { grid-template-columns: 22px minmax(0, 1fr) auto auto auto; }
    .fav-row small { display: none; }
}
.sp-how { margin-bottom: 14px; }
.sp-how-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 4px 16px 16px; }
.sp-how-step { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 12px; --fa-secondary-opacity: .45; }
.sp-how-step > i { font-size: 22px; color: var(--primary); display: block; margin-bottom: 8px; }
.sp-how-step b { display: block; margin-bottom: 4px; }
.sp-how-step p { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.sp-how-n { position: absolute; top: 10px; right: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sp-how-demo { margin: 0 16px 16px; padding: 10px 14px; border-radius: var(--radius); background: #fff7ec; border: 1px solid #f1dcc0; font-size: 13px; color: #7a5002; }
@media (max-width: 1000px) { .sp-how-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .sp-how-steps { grid-template-columns: 1fr; } }
/* ---- demo booked, not public ---- */
.login-locked { display: flex; gap: 12px; align-items: flex-start; background: #fff7ec; border: 1px solid #f1dcc0; color: #6b4a12; border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.45; --fa-secondary-opacity: .45; }
.login-locked i { font-size: 22px; color: #d9774b; margin-top: 2px; }
/* ---- demo: phone and mailbox preview of the notices sent outside the app ---- */
.dx-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; background: var(--surface); border-left: 1px solid var(--line); box-shadow: -12px 0 32px rgba(20, 30, 40, .16); z-index: 900; transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column; }
.dx-panel.is-open { transform: none; }
.dx-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.dx-head h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; --fa-secondary-opacity: .45; }
.dx-intro { margin: 0 16px 10px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.dx-tabs { margin: 0 16px 12px; align-self: flex-start; }
.dx-content { flex: 1; min-height: 0; overflow: auto; padding: 0 16px 16px; }
.dx-empty { color: var(--muted); font-size: 13px; padding: 18px 10px; text-align: center; line-height: 1.45; }
.dx-phone { margin: 0 auto; width: 320px; max-width: 100%; height: 560px; border: 10px solid #1c2733; border-radius: 34px; background: #cfe0ea; display: flex; flex-direction: column; overflow: hidden; position: relative; }
.dx-phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 110px; height: 18px; background: #1c2733; border-radius: 0 0 12px 12px; z-index: 1; }
.dx-tg-head { display: flex; align-items: center; gap: 10px; background: #517da2; color: #fff; padding: 24px 12px 10px; }
.dx-tg-head small { display: block; opacity: .8; font-size: 11px; }
.dx-tg-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; }
.dx-tg-avatar img { width: 26px; height: 26px; }
.dx-tg-body { flex: 1; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.dx-tg-msg { background: #fff; border-radius: 12px 12px 12px 4px; padding: 8px 10px 16px; font-size: 13px; line-height: 1.4; position: relative; max-width: 92%; box-shadow: 0 1px 1px rgba(0,0,0,.08); display: flex; flex-direction: column; gap: 3px; }
.dx-tg-msg a { color: #2b7bb9; font-weight: 600; cursor: pointer; }
.dx-tg-msg time { position: absolute; right: 8px; bottom: 3px; font-size: 10.5px; color: #8a9aa8; }
.dx-mail { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.dx-mail-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font-size: 13px; cursor: pointer; }
.dx-mail-row:last-child { border-bottom: 0; }
.dx-mail-row:hover { background: var(--surface-2); }
.dx-mail-from { font-weight: 700; }
.dx-mail-subj { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.dx-mail-subj b { color: var(--ink); }
.dx-mail-row time { font-size: 12px; color: var(--muted); }
.dx-mail-open { display: flex; flex-direction: column; gap: 10px; }
.dx-mail-meta b { display: block; font-size: 15px; }
.dx-mail-meta small { color: var(--muted); line-height: 1.5; }
.dx-mail-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.dx-mail-brand { font-size: 18px; font-weight: 700; color: #1f6f8b; }
.dx-mail-box { background: #f6f4ef; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.dx-mail-box p { margin: 0; font-size: 13.5px; color: #3a4655; }
.dx-pops { position: fixed; top: 14px; right: 14px; z-index: 950; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.dx-pop { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; width: 340px; max-width: calc(100vw - 28px); text-align: left; background: rgba(250, 250, 250, .97); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 28px rgba(20, 30, 40, .22); cursor: pointer; transform: translateY(-20px); opacity: 0; transition: transform .3s ease, opacity .3s ease; }
.dx-pop.is-in { transform: none; opacity: 1; }
.dx-pop-app { width: 32px; height: 32px; flex: none; border-radius: 8px; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.dx-pop-app.is-tg { background: #2aa3de; }
.dx-pop-app.is-mail { background: #d9774b; }
.dx-pop-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.dx-pop-text small { color: var(--muted); font-size: 11px; }
.dx-pop-text span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
