/* Module 11: customer service, messaging and the security centre. */
.sd-links { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-sectabs { flex-wrap: wrap; }
.sd-sectabs .n, .sd-links .n { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: var(--badBg); color: var(--badFg); font-size: 11px; font-weight: 700; }
.sd-h { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 6px; }
.sd-inline { display: inline-block; }
.sd-inline[open] { display: block; margin-top: 8px; }
.sd-inline > summary { list-style: none; cursor: pointer; display: inline-flex; }
.sd-inline > summary::-webkit-details-marker { display: none; }
.sd-inline[open] > summary { margin-bottom: 10px; }
.sd-fieldset { border: 1px solid var(--line2); border-radius: var(--radius); padding: 8px 12px 10px; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.sd-fieldset legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.sd-fieldset .sub { flex-basis: 100%; }

/* Ticket threads and chat */
.sd-thread { list-style: none; margin: 0; padding: 12px 16px; display: grid; gap: 10px; }
.sd-msg { background: var(--panel2); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 12px; max-width: 86%; justify-self: start; overflow-wrap: anywhere; }
.sd-msg p { margin: 4px 0 0; white-space: pre-wrap; }
.sd-msg.staff { background: var(--infoBg); border-color: #c6dcf5; }
.sd-msg.mine { justify-self: end; }
.sd-msg.internal { background: var(--warnBg); border-color: #f0d68a; border-style: dashed; justify-self: stretch; max-width: none; }
.sd-chat { display: grid; gap: 10px; }
.sd-chatlist { max-height: 460px; overflow-y: auto; border: 1px solid var(--line2); border-radius: var(--radius); background: var(--panel); }
.sd-notes { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.sd-notes li .sub { display: block; }

/* Complaint and incident timelines */
.sd-timeline { list-style: none; margin: 0; padding: 10px 16px; display: grid; gap: 8px; }
.sd-timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; align-items: start; }
.sd-timeline li .sub { display: block; }
.sd-timeline i { color: var(--blue); font-size: 20px; line-height: 1; }

/* Notification policy and wording */
.sd-policy td { vertical-align: top; }
.sd-num { width: 72px; }
.sd-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.sd-chip { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 11.5px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); text-decoration: none; }
.sd-chip.live { background: var(--okBg); color: var(--okFg); border-color: #a9dfc4; }
.sd-chip.draft { background: var(--warnBg); color: var(--warnFg); border-color: #f0d68a; }
.sd-preview { border: 1px solid var(--line2); border-radius: var(--radius); background: var(--panel2); padding: 12px; }
.sd-preview-subject { font-weight: 700; margin-bottom: 6px; }
.sd-preview-body { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Security centre */
.sd-matrix th, .sd-matrix td.c { text-align: center; }
.sd-matrix th:first-child { text-align: left; }
.sd-matrix .sd-vert { display: inline-block; max-width: 110px; white-space: normal; }
.sd-grouprow th { background: var(--panel2); text-align: left !important; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.sd-yes { color: var(--okFg); font-size: 16px; }
.sd-no { color: var(--line); }
.sd-passkey { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sd-alt-signin[hidden] { display: none !important; }
