:root {
  --app-bg: #f7f8fa;
  --sidebar-bg: #fbfbfc;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-subtle: #f4f5f7;
  --surface-hover: #f0f2f5;
  --text: #20242c;
  --text-strong: #111318;
  --muted: #687080;
  --muted-soft: #9097a5;
  --line: #e4e6ea;
  --line-strong: #d6d9df;
  --brand-navy: #182e73;
  --brand-yellow: #f7b23b;
  --primary: #182e73;
  --primary-hover: #12245d;
  --primary-soft: #edf1ff;
  --primary-text: #182e73;
  --on-primary: #ffffff;
  --danger: #d92d20;
  --danger-soft: #fff0ee;
  --warning: #b54708;
  --warning-soft: #fff4e8;
  --success: #067647;
  --success-soft: #eafaf1;
  --info: #175cd3;
  --info-soft: #eaf2ff;
  --control-bg: #ffffff;
  --control-line: #d7dbe2;
  --board-column: #f0f1f4;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .08);
  --radius-sm: 7px;
  --radius: 10px;
  --radius-lg: 14px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Personal tickettool phase 3: notifications, contacts and side conversations. */
.pt-notification-button {
  position: relative;
}

.pt-notification-count {
  align-items: center;
  background: #e5484d;
  border: 2px solid var(--surface, #fff);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 800;
  height: 1.25rem;
  justify-content: center;
  min-width: 1.25rem;
  padding: 0 0.22rem;
  position: absolute;
  right: -0.35rem;
  top: -0.35rem;
}

.pt-notification-layout,
.pt-contact-settings-grid,
.pt-side-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.85fr);
}

.pt-notification-list,
.pt-contact-list,
.pt-compact-list,
.pt-side-message-list {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.pt-notification-item,
.pt-contact-list article,
.pt-compact-list article {
  align-items: center;
  border: 1px solid var(--border, #dfe3ea);
  border-radius: 0.75rem;
  display: flex;
  gap: 0.8rem;
  justify-content: space-between;
  padding: 0.85rem;
}

.pt-notification-item.is-unread {
  background: #f0f5ff;
  border-color: #b7ccfb;
}

.pt-notification-item > div,
.pt-contact-list article > div,
.pt-compact-list article > div {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.pt-notification-item p {
  margin: 0;
}

.pt-notification-item small,
.pt-contact-list small,
.pt-compact-list small {
  color: var(--muted, #687386);
}

.pt-notification-dot {
  background: #246bfe;
  border-radius: 999px;
  flex: 0 0 auto;
  height: 0.55rem;
  width: 0.55rem;
}

.pt-notification-item:not(.is-unread) .pt-notification-dot {
  background: #c8ced8;
}

.pt-notification-preferences {
  display: grid;
  gap: 0.75rem;
}

.pt-notification-preferences label {
  align-items: center;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.7fr);
}

.pt-ticket-side-conversations {
  margin-top: 1rem;
}

.pt-side-form-card {
  max-width: 58rem;
}

.pt-side-summary {
  align-self: start;
}

.pt-side-message {
  border: 1px solid var(--border, #dfe3ea);
  border-radius: 0.85rem;
  max-width: 82%;
  padding: 0.9rem 1rem;
}

.pt-side-message-outgoing {
  background: #eef4ff;
  border-color: #bfd1f7;
  justify-self: end;
}

.pt-side-message-incoming {
  background: var(--surface, #fff);
  justify-self: start;
}

.pt-side-message.is-failed {
  border-color: #e5484d;
}

.pt-side-message header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.pt-side-message time,
.pt-side-message small {
  color: var(--muted, #687386);
  font-size: 0.78rem;
}

.pt-side-reply {
  border-top: 1px solid var(--border, #dfe3ea);
  margin-top: 1rem;
  padding-top: 1rem;
}

.pt-contact-unknown {
  background: #fff7e8;
  border: 1px solid #f2d49b;
  border-radius: 0.7rem;
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
}

.pt-contact-unknown small {
  color: #73510d;
}

@media (max-width: 980px) {
  .pt-notification-layout,
  .pt-contact-settings-grid,
  .pt-side-layout {
    grid-template-columns: 1fr;
  }

  .pt-side-message {
    max-width: 95%;
  }
}

:root[data-theme="dark"] {
  --app-bg: #0c1221;
  --sidebar-bg: #10182a;
  --surface: #151e31;
  --surface-raised: #19243a;
  --surface-subtle: #1d2941;
  --surface-hover: #202d47;
  --text: #dce2ed;
  --text-strong: #f5f7fa;
  --muted: #9da9bd;
  --muted-soft: #748198;
  --line: #27344c;
  --line-strong: #394a68;
  --brand-navy: #182e73;
  --brand-yellow: #f7b23b;
  --primary: #f7b23b;
  --primary-hover: #ffc35d;
  --primary-soft: #382d19;
  --primary-text: #ffcb70;
  --on-primary: #17213a;
  --danger: #ff8a80;
  --danger-soft: #402321;
  --warning: #fdb022;
  --warning-soft: #3e3020;
  --success: #75e0a7;
  --success-soft: #17392b;
  --info: #84adff;
  --info-soft: #1d3154;
  --control-bg: #111a2b;
  --control-line: #394a68;
  --board-column: #10182a;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .22);
  --shadow-sm: 0 2px 5px rgba(0, 0, 0, .22);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--app-bg); }
body { margin: 0; min-height: 100vh; background: var(--app-bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { transition: border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent); outline-offset: 2px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { color: var(--text-strong); letter-spacing: -.025em; }
h1 { margin: 0; font-size: clamp(25px, 2.5vw, 34px); line-height: 1.18; font-weight: 720; }
h2 { font-size: 16px; line-height: 1.35; }
h3 { font-size: 14px; line-height: 1.4; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 15px 14px 14px; background: var(--sidebar-bg); border-top: 3px solid var(--brand-yellow); border-right: 1px solid var(--line); z-index: 30; }
.sidebar-brand { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 3px 7px; color: var(--text-strong); text-decoration: none; }
.sidebar-brand > span:last-child { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sidebar-brand strong { font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.sidebar-brand small { color: var(--muted); font-size: 10px; letter-spacing: .025em; }
.salure-logo-wrap { flex: 0 0 auto; display: flex; align-items: center; width: 92px; height: 39px; padding: 4px 6px; border: 1px solid rgba(24, 46, 115, .08); border-radius: 8px; background: #ffffff; }
.salure-logo { display: block; width: 100%; height: auto; }
.product-lockup { padding-left: 10px; border-left: 1px solid var(--line); }
.brand-mark, .mobile-brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; border-radius: 8px; background: var(--brand-navy); color: #ffffff; font-weight: 800; font-size: 14px; box-shadow: var(--shadow-xs); }
:root[data-theme="dark"] .mobile-brand-mark { background: var(--brand-yellow); color: var(--brand-navy); }
.workspace-switcher { margin: 20px 3px 12px; padding: 9px; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.workspace-switcher > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.workspace-switcher strong { color: var(--text-strong); font-size: 12px; }
.workspace-switcher small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-avatar, .user-avatar { display: grid; place-items: center; border-radius: 8px; background: var(--brand-yellow); color: var(--brand-navy); font-size: 10px; font-weight: 800; }
.workspace-avatar { width: 30px; height: 30px; }
.workspace-chevron { color: var(--muted-soft); }
.sidebar-nav { min-height: 0; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: thin; }
.nav-label { margin: 15px 9px 5px; color: var(--muted-soft); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.nav-label-secondary { margin-top: 22px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 560; text-decoration: none; }
.nav-item:hover { background: var(--surface-hover); color: var(--text-strong); }
.nav-item.is-active { background: var(--primary-soft); color: var(--primary-text); font-weight: 680; }
.nav-item.is-active::before { content: ""; position: absolute; left: -11px; top: 9px; width: 3px; height: 20px; border-radius: 0 4px 4px 0; background: var(--primary); }
.nav-section-divider { margin: 13px 4px 3px; border-top: 1px solid var(--line); }
.tickettool-nav-group { display: grid; gap: 3px; }
.tickettool-nav-label { margin-top: 8px; }
.nav-item-create { color: var(--primary-text); font-weight: 650; }
.nav-submenu {
  position: relative;
  display: grid;
  gap: 2px;
  margin: 3px 0 8px 18px;
  padding: 3px 0 3px 13px;
  border-left: 1px solid var(--line);
}
.nav-subitem {
  min-width: 0;
  min-height: 29px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 570;
  text-decoration: none;
}
.nav-subitem:hover,
.nav-subitem.is-active {
  background: var(--surface-hover);
  color: var(--text-strong);
}
.nav-subitem.is-active {
  color: var(--primary-text);
  font-weight: 700;
}
.nav-subitem-create {
  margin-bottom: 3px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--line));
  background: color-mix(in srgb, var(--primary-soft) 54%, var(--surface));
  color: var(--primary-text);
}
.nav-subitem-create > span:first-child {
  font-size: 14px;
  line-height: 1;
}
.nav-subcount {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  margin-left: auto;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 7px;
  font-weight: 760;
}
.nav-symbol { position: relative; width: 16px; height: 16px; flex: 0 0 16px; color: currentColor; }
.nav-symbol::before, .nav-symbol::after { content: ""; position: absolute; border: 1.5px solid currentColor; }
.nav-symbol-today::before { inset: 1px; border-radius: 50%; }
.nav-symbol-today::after { left: 7px; top: 4px; width: 3px; height: 4px; border-width: 0 0 1.5px 1.5px; }
.nav-symbol-inbox::before { inset: 3px 1px 2px; border-radius: 3px; }
.nav-symbol-inbox::after { left: 4px; right: 4px; bottom: 5px; height: 3px; border-width: 0 0 1.5px; }
.nav-symbol-list::before { inset: 2px 1px; border-radius: 3px; }
.nav-symbol-list::after { left: 5px; right: 3px; top: 6px; height: 4px; border-width: 1.5px 0; }
.nav-symbol-board::before { inset: 2px 1px; border-radius: 3px; }
.nav-symbol-board::after { top: 3px; bottom: 3px; left: 7px; border-width: 0 0 0 1.5px; }
.nav-symbol-calendar::before { inset: 2px 1px 1px; border-radius: 3px; }
.nav-symbol-calendar::after { left: 3px; right: 3px; top: 6px; height: 1px; border-width: 1.5px 0 0; box-shadow: 0 3px 0 currentColor; }
.nav-symbol-plus::before { width: 12px; left: 2px; top: 7px; border-width: 1.5px 0 0; }
.nav-symbol-plus::after { height: 12px; left: 7px; top: 2px; border-width: 0 0 0 1.5px; }
.nav-symbol-users::before { width: 6px; height: 6px; left: 1px; top: 1px; border-radius: 50%; }
.nav-symbol-users::after { left: 0; right: 0; bottom: 1px; height: 6px; border-radius: 7px 7px 3px 3px; }
.nav-symbol-mail::before { inset: 2px 1px; border-radius: 3px; }
.nav-symbol-mail::after { left: 3px; top: 3px; width: 8px; height: 6px; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.nav-symbol-complete::before { inset: 1px; border-radius: 4px; }
.nav-symbol-complete::after { left: 4px; top: 4px; width: 7px; height: 4px; border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.nav-symbol-settings::before { inset: 2px; border-radius: 50%; }
.nav-symbol-settings::after { inset: 5px; border-radius: 50%; background: currentColor; }
.nav-count { margin-left: auto; min-width: 19px; height: 19px; display: grid; place-items: center; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #ffffff; font-size: 9px; font-weight: 800; }
.sidebar-footer { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.account-card { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 7px 5px; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; }
.account-copy { min-width: 0; display: flex; flex-direction: column; }
.account-copy strong, .account-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { color: var(--text-strong); font-size: 11px; }
.account-copy small { color: var(--muted); font-size: 9px; }
.icon-button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-hover); color: var(--text-strong); }

.workspace-shell { min-width: 0; }
.utilitybar { position: sticky; top: 0; z-index: 20; height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 32px; background: color-mix(in srgb, var(--app-bg) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.utility-context, .utility-actions { display: flex; align-items: center; gap: 12px; }
.utility-context > span:last-child { display: flex; flex-direction: column; }
.utility-context strong { color: var(--text-strong); font-size: 12px; }
.utility-context small { color: var(--muted); font-size: 10px; }
.mobile-brand-mark { display: none; }
.theme-control { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 5px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-xs); }
.theme-control select { width: auto; min-width: 105px; padding: 4px 22px 4px 2px; border: 0; background: transparent; color: var(--muted); font-size: 11px; outline: 0; cursor: pointer; }
.theme-indicator { width: 11px; height: 11px; border: 3px solid var(--text-strong); border-radius: 50%; box-shadow: inset 5px 0 0 var(--surface); }
.page { width: min(100%, 1540px); margin: 0 auto; padding: 36px 40px 72px; }
.public-page { min-height: calc(100vh - 68px); padding: 24px; }
.public-topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; border-top: 3px solid var(--brand-yellow); border-bottom: 1px solid var(--line); background: var(--surface); }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 28px; margin-bottom: 26px; }
.page-heading-copy { max-width: 680px; }
.page-heading p:not(.eyebrow) { max-width: 620px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0 0 7px; color: var(--primary); font-size: 9px; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.button { min-height: 38px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 13px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 650; font-size: 12px; line-height: 1; text-decoration: none; box-shadow: var(--shadow-xs); cursor: pointer; }
.button:hover { transform: translateY(-1px); border-color: var(--muted-soft); background: var(--surface-hover); box-shadow: var(--shadow-sm); }
.button-primary, .button:not(.button-secondary) { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.button-primary:hover, .button:not(.button-secondary):hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.button-secondary { background: var(--surface); color: var(--text); }
.button-small, .button-compact { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--primary); font: inherit; cursor: pointer; text-decoration: none; }
.link-button:hover { text-decoration: underline; }

.flash { margin-bottom: 18px; padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); border-radius: 9px; background: var(--info-soft); color: var(--info); font-size: 12px; }
.flash-error, .text-error { color: var(--danger); }
.flash-error { border-color: color-mix(in srgb, var(--danger) 25%, transparent); background: var(--danger-soft); }
.flash-success { border-color: color-mix(in srgb, var(--success) 25%, transparent); background: var(--success-soft); color: var(--success); }

.sync-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin: 0 0 18px; }
.sync-state { position: relative; min-height: 74px; display: grid; grid-template-columns: 8px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-content: center; padding: 14px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.sync-state::before { content: ""; grid-row: 1 / 3; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.sync-state strong { color: var(--text-strong); font-size: 11px; }
.sync-state span, .sync-state small { color: var(--muted); font-size: 10px; }

.filters { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(130px, auto)) auto; gap: 8px; margin: 0 0 16px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
input, select, textarea { width: 100%; border: 1px solid var(--control-line); border-radius: 7px; background: var(--control-bg); padding: 9px 10px; color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--muted-soft); }
input:hover, select:hover, textarea:hover { border-color: var(--muted-soft); }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent); outline: 0; }
textarea { min-height: 98px; resize: vertical; }
label > span { display: block; margin-bottom: 6px; color: var(--text-strong); font-size: 11px; font-weight: 680; }
label small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.errorlist { margin: 5px 0 0; padding-left: 16px; color: var(--danger); font-size: 10px; }

.mail-list { display: grid; gap: 8px; }
.mail-card { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.mail-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.mail-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary-text); font-size: 11px; font-weight: 760; }
.mail-content { min-width: 0; }
.mail-content h2 { margin: 0 0 2px; font-size: 13px; }
.mail-content p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.mail-content .sender { margin: 0; color: var(--muted); font-size: 10px; }
.mail-side { min-width: 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.mail-meta, .board-meta { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.mail-card .actions { justify-content: flex-end; }
.attachment { display: inline-flex; align-items: center; margin-top: 9px; color: var(--warning); font-size: 9px; }
.attachment::before { content: "⌕"; margin-right: 4px; }

.badge, .status { display: inline-flex; align-items: center; gap: 5px; width: fit-content; min-height: 21px; padding: 2px 7px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.badge-alert { background: var(--danger-soft); color: var(--danger); }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-todo { background: var(--info-soft); color: var(--info); }
.status-in_progress { background: var(--warning-soft); color: var(--warning); }
.status-waiting { background: var(--primary-soft); color: var(--primary-text); }
.status-done { background: var(--success-soft); color: var(--success); }
.status-completed { background: var(--success-soft); color: var(--success); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--surface-subtle); color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
tbody tr { transition: background-color .14s ease; }
tbody tr:hover { background: var(--surface-hover); }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: 11px; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.ticket-link { margin-right: 7px; color: var(--text-strong); font-size: 12px; font-weight: 680; text-decoration: none; }
.ticket-link:hover { color: var(--primary); }
td:last-child { width: 190px; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }

.ticket-quick-actions { position: relative; display: flex; align-items: center; gap: 4px; }
.ticket-quick-actions form { margin: 0; }
.quick-action-button { width: 29px; height: 29px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1; box-shadow: var(--shadow-xs); cursor: pointer; list-style: none; }
.quick-action-button::-webkit-details-marker { display: none; }
.quick-action-button:hover { border-color: var(--line-strong); background: var(--surface-hover); color: var(--text-strong); }
.quick-action-button.is-active { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); background: var(--primary-soft); color: var(--primary-text); }
.snooze-menu { position: relative; }
.snooze-popover { position: absolute; z-index: 60; top: 35px; right: 0; width: 210px; display: grid; gap: 3px; padding: 9px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-raised); box-shadow: var(--shadow-md); }
.snooze-popover strong { padding: 5px 7px; color: var(--text-strong); font-size: 10px; }
.snooze-popover button { width: 100%; padding: 7px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-size: 10px; text-align: left; cursor: pointer; }
.snooze-popover button:hover { background: var(--surface-hover); }
.custom-snooze { display: grid; grid-template-columns: 1fr; gap: 4px; padding-top: 5px; margin-top: 3px !important; border-top: 1px solid var(--line); }
.custom-snooze input { padding: 6px 7px; font-size: 9px; }
.inline-status select { width: auto; min-width: 92px; padding: 6px 24px 6px 8px; border-color: var(--line); font-size: 9px; }

.dashboard-heading { margin-bottom: 22px; }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 20px; }
.metric-card { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); text-decoration: none; }
.metric-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.metric-card > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.metric-card strong { color: var(--text-strong); font-size: 20px; line-height: 1.05; letter-spacing: -.04em; }
.metric-card small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.metric-card-alert strong { color: var(--danger); }
.metric-icon { position: relative; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-text); }
.metric-icon::before, .metric-icon::after { content: ""; position: absolute; border: 1.5px solid currentColor; }
.metric-inbox::before { inset: 8px 6px 6px; border-radius: 3px; }
.metric-inbox::after { left: 10px; right: 10px; bottom: 9px; border-width: 0 0 1.5px; }
.metric-reply::before { left: 7px; top: 7px; width: 14px; height: 10px; border-radius: 3px; }
.metric-reply::after { left: 10px; bottom: 7px; width: 5px; height: 5px; border-width: 0 0 1.5px 1.5px; transform: skew(-25deg); }
.metric-today::before { inset: 6px; border-radius: 4px; }
.metric-today::after { left: 10px; right: 10px; top: 12px; border-width: 1.5px 0 0; }
.metric-overdue { background: var(--danger-soft); color: var(--danger); }
.metric-overdue::before { inset: 5px; border-radius: 50%; }
.metric-overdue::after { left: 13px; top: 9px; height: 8px; border-width: 0 0 0 1.5px; }
.metric-follow::before { inset: 6px; border-radius: 50%; }
.metric-follow::after { left: 13px; top: 10px; width: 5px; height: 4px; border-width: 0 0 1.5px 1.5px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .75fr); gap: 14px; align-items: start; }
.dashboard-panel { padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 2px 3px 13px; }
.panel-heading h2 { margin: 0; font-size: 14px; }
.panel-heading .eyebrow { margin-bottom: 3px; }
.panel-heading > a { color: var(--muted); font-size: 10px; text-decoration: none; }
.panel-heading > a:hover { color: var(--primary); }
.panel-count { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 7px; background: var(--surface-subtle); color: var(--muted); font-size: 10px; font-weight: 750; }
.focus-list, .follow-up-list { display: grid; gap: 7px; }
.focus-ticket { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); }
.focus-ticket.is-pinned { border-left: 3px solid var(--brand-yellow); }
.focus-ticket-heading { display: flex; align-items: center; gap: 7px; }
.focus-ticket-heading > a { color: var(--text-strong); font-size: 11px; font-weight: 690; text-decoration: none; }
.focus-ticket-heading > a:hover { color: var(--primary); }
.pin-label { padding: 2px 5px; border-radius: 5px; background: var(--primary-soft); color: var(--primary-text); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.focus-ticket-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 5px; color: var(--muted); font-size: 9px; }
.focus-ticket-actions { display: flex; align-items: center; gap: 7px; }
.reason-list { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.reason-list span { padding: 3px 6px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 8px; font-weight: 650; }
.reason-list span:first-child { background: var(--primary-soft); color: var(--primary-text); }
.follow-up-panel { position: sticky; top: 80px; }
.follow-up-card { position: relative; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-raised); }
.follow-up-card > a { display: block; padding-right: 60px; color: var(--text-strong); font-size: 10px; font-weight: 680; text-decoration: none; }
.follow-up-card > span { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.follow-up-card > .ticket-quick-actions { position: absolute; top: 9px; right: 9px; }
.empty-state-compact { padding: 30px 14px; }

.board { display: grid; grid-template-columns: repeat(4, minmax(245px, 1fr)); gap: 10px; overflow-x: auto; align-items: start; padding-bottom: 10px; }
.board-column { min-height: 430px; padding: 10px; background: var(--board-column); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.board-column > header { display: flex; justify-content: space-between; align-items: center; padding: 3px 4px 11px; }
.board-column > header h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 11px; letter-spacing: 0; }
.board-column > header h2::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-soft); }
.board-column > header > span { display: grid; place-items: center; min-width: 20px; height: 20px; border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 700; }
.board-card { margin-bottom: 8px; padding: 13px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-xs); }
.board-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.board-card > a { display: block; margin-bottom: 8px; color: var(--text-strong); font-size: 11px; font-weight: 680; text-decoration: none; }
.board-card p, .column-empty { margin: 7px 0; color: var(--muted); font-size: 9px; }
.board-card select { margin-top: 9px; padding: 6px 8px; border-color: var(--line); font-size: 9px; }
.column-empty { padding: 22px 5px; text-align: center; }

.board-heading { margin-bottom: 14px; }
.view-switcher { width: fit-content; display: inline-flex; gap: 3px; padding: 3px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); box-shadow: var(--shadow-xs); }
.view-switcher a { min-width: 74px; padding: 7px 12px; border-radius: 6px; color: var(--muted); font-size: 10px; font-weight: 680; text-align: center; text-decoration: none; }
.view-switcher a:hover { color: var(--text-strong); }
.view-switcher a.is-active { background: var(--surface); color: var(--text-strong); box-shadow: var(--shadow-xs); }
.board-filters { grid-template-columns: minmax(220px, 1fr) 130px 145px auto auto; margin-bottom: 16px; }
.filter-check { min-height: 35px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.filter-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--primary); }
.filter-check span { margin: 0; color: var(--muted); font-size: 9px; white-space: nowrap; }

.calendar-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 11px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); }
.calendar-toolbar h2 { margin: 0; font-size: 14px; text-align: center; text-transform: capitalize; }
.calendar-period-nav, .calendar-date-jump { display: flex; align-items: center; gap: 6px; }
.calendar-date-jump { justify-content: flex-end; }
.calendar-date-jump input { width: 132px; padding-block: 7px; font-size: 9px; }
.calendar-date-jump .button, .calendar-today { min-height: 31px; padding-block: 6px; font-size: 9px; }
.calendar-nav-button { display: grid; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; }

.calendar-exceptions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.exception-strip { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-xs); }
.exception-strip summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--text-strong); font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.exception-strip summary::-webkit-details-marker { display: none; }
.exception-strip summary::before { content: "›"; color: var(--muted); font-size: 15px; transform-origin: center; transition: transform .16s ease; }
.exception-strip[open] summary::before { transform: rotate(90deg); }
.exception-strip summary strong { min-width: 20px; height: 20px; display: grid; place-items: center; margin-left: auto; border-radius: 6px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; }
.exception-ticket-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; padding: 0 8px 8px; }
.exception-ticket-list > p { margin: 0; padding: 8px 4px; color: var(--muted); font-size: 9px; }

.week-calendar { display: grid; grid-template-columns: repeat(7, minmax(145px, 1fr)); gap: 7px; overflow-x: auto; padding-bottom: 8px; }
.calendar-day { min-width: 0; border: 1px solid var(--line); background: var(--surface); transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.week-day { min-height: 390px; padding: 8px; border-radius: var(--radius); }
.week-day > header { display: grid; grid-template-columns: auto 1fr auto; gap: 5px; align-items: center; min-height: 34px; padding: 2px 3px 9px; border-bottom: 1px solid var(--line); }
.week-day > header span { color: var(--muted); font-size: 8px; font-weight: 760; text-transform: uppercase; }
.week-day > header time { color: var(--text-strong); font-size: 9px; font-weight: 680; text-transform: capitalize; }
.week-day > header strong { min-width: 19px; height: 19px; display: grid; place-items: center; border-radius: 6px; background: var(--surface-subtle); color: var(--muted); font-size: 8px; }
.calendar-day.is-today { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); box-shadow: inset 0 2px 0 var(--primary); }
.calendar-day.is-drop-target { border-color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 28%, transparent); }
.calendar-day-tickets { display: grid; align-content: start; gap: 5px; padding-top: 7px; }
.calendar-day-empty { margin: 22px 0; color: var(--muted-soft); font-size: 8px; text-align: center; }

.month-calendar { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.calendar-weekdays, .month-week { min-width: 805px; display: grid; grid-template-columns: repeat(7, minmax(115px, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--line); background: var(--surface-subtle); }
.calendar-weekdays span { padding: 9px 10px; color: var(--muted); font-size: 8px; font-weight: 760; letter-spacing: .05em; text-transform: uppercase; }
.month-week:not(:last-child) { border-bottom: 1px solid var(--line); }
.month-day { min-height: 132px; padding: 7px; border: 0; border-radius: 0; }
.month-day:not(:last-child) { border-right: 1px solid var(--line); }
.month-day > header { display: flex; justify-content: flex-end; min-height: 20px; }
.month-day > header time { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); font-size: 9px; font-weight: 700; }
.month-day.is-today > header time { background: var(--primary); color: #ffffff; }
.month-day.is-outside { background: var(--surface-subtle); }
.month-day.is-outside > header, .month-day.is-outside .calendar-ticket { opacity: .55; }
.calendar-more { display: block; padding: 5px 4px 2px; color: var(--primary-text); font-size: 8px; font-weight: 700; text-decoration: none; }

.calendar-ticket { position: relative; min-width: 0; padding: 8px 27px 8px 9px; border: 1px solid var(--line); border-left: 3px solid var(--muted-soft); border-radius: 7px; background: var(--surface-raised); box-shadow: var(--shadow-xs); }
.calendar-ticket[draggable="true"] { cursor: grab; }
.calendar-ticket[draggable="true"]:active { cursor: grabbing; }
.calendar-ticket.is-dragging { opacity: .45; }
.calendar-ticket.priority-urgent { border-left-color: var(--danger); }
.calendar-ticket.priority-high { border-left-color: var(--warning); }
.calendar-ticket.priority-normal { border-left-color: var(--info); }
.calendar-ticket.priority-low { border-left-color: var(--success); }
.calendar-ticket.is-complete { opacity: .68; }
.calendar-ticket > a { display: block; overflow: hidden; color: var(--text-strong); font-size: 9px; font-weight: 690; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.calendar-ticket > a:hover { color: var(--primary); }
.calendar-ticket-meta { min-width: 0; display: flex; align-items: center; gap: 5px; margin-top: 5px; color: var(--muted); font-size: 7px; }
.calendar-ticket-meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-ticket-meta .status { min-height: 17px; padding: 1px 5px; font-size: 7px; }
.calendar-replan-button { position: absolute; top: 6px; right: 5px; width: 21px; height: 21px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.calendar-replan-button:hover { background: var(--surface-hover); color: var(--text-strong); }

.calendar-integration-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.calendar-legend, .calendar-integration-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; }
.calendar-legend span, .calendar-integration-actions, .calendar-last-sync { color: var(--muted); font-size: 8px; }
.calendar-legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 3px; vertical-align: -1px; }
.legend-ticket { background: var(--info); }
.legend-outlook { background: #7950f2; }
.calendar-integration-actions form { margin: 0; }
.calendar-integration-actions > a { font-size: 8px; font-weight: 700; text-decoration: none; }
.compact-switch { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.compact-switch input { margin: 0; accent-color: var(--primary); }
.calendar-notice, .calendar-warning { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--info) 30%, var(--line)); border-radius: var(--radius); background: var(--info-soft); color: var(--text); }
.calendar-notice { font-size: 9px; }
.calendar-notice a { font-weight: 750; }
.calendar-warning { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); background: var(--warning-soft); }
.calendar-warning strong { display: block; color: var(--text-strong); font-size: 11px; }
.calendar-warning p { margin: 2px 0 0; color: var(--muted); font-size: 9px; }
.compact-warning { padding: 9px 12px; }

.outlook-event { position: relative; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); border-left: 3px solid #7950f2; border-radius: 7px; background: color-mix(in srgb, #7950f2 7%, var(--surface-raised)); box-shadow: var(--shadow-xs); }
.outlook-event-time { display: block; margin-bottom: 2px; color: var(--muted); font-size: 7px; font-weight: 750; }
.outlook-event > a, .outlook-event > strong { display: block; overflow: hidden; color: var(--text-strong); font-size: 9px; font-weight: 690; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.outlook-event > a:hover { color: var(--primary); }
.outlook-event-calendar { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.outlook-event.is-all-day { background: color-mix(in srgb, #7950f2 12%, var(--surface-raised)); }
.calendar-color-lightblue { border-left-color: #3b82f6; }
.calendar-color-lightgreen { border-left-color: #22c55e; }
.calendar-color-lightorange { border-left-color: #f97316; }
.calendar-color-lightgray { border-left-color: #94a3b8; }
.calendar-color-lightyellow { border-left-color: #eab308; }
.calendar-color-lightteal { border-left-color: #14b8a6; }
.calendar-color-lightpink { border-left-color: #ec4899; }
.calendar-color-lightbrown { border-left-color: #a16207; }
.calendar-color-lightred { border-left-color: #ef4444; }
.calendar-color-dot { width: 10px; height: 10px; border-radius: 50%; background: #7950f2; }
.calendar-color-dot.calendar-color-lightblue { background: #3b82f6; }
.calendar-color-dot.calendar-color-lightgreen { background: #22c55e; }
.calendar-color-dot.calendar-color-lightorange { background: #f97316; }
.calendar-color-dot.calendar-color-lightgray { background: #94a3b8; }
.calendar-color-dot.calendar-color-lightyellow { background: #eab308; }
.calendar-color-dot.calendar-color-lightteal { background: #14b8a6; }
.calendar-color-dot.calendar-color-lightpink { background: #ec4899; }
.calendar-color-dot.calendar-color-lightbrown { background: #a16207; }
.calendar-color-dot.calendar-color-lightred { background: #ef4444; }

.calendar-settings-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, .8fr); gap: 14px; align-items: start; }
.settings-panel { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
.settings-panel > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.settings-panel h2, .settings-panel .eyebrow { margin: 0; }
.read-only-badge { padding: 4px 7px; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: 8px; font-weight: 780; text-transform: uppercase; letter-spacing: .05em; }
.calendar-option-list { display: grid; padding: 8px; }
.calendar-option { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; cursor: pointer; }
.calendar-option:hover { background: var(--surface-hover); }
.calendar-option input { position: absolute; opacity: 0; pointer-events: none; }
.calendar-option-copy { min-width: 0; display: flex; flex-direction: column; }
.calendar-option-copy strong { overflow: hidden; color: var(--text-strong); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.calendar-option-copy small { color: var(--muted); font-size: 8px; }
.calendar-checkmark { width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--control-line); border-radius: 6px; color: transparent; font-size: 11px; }
.calendar-option input:checked ~ .calendar-checkmark { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.settings-actions { display: flex; justify-content: flex-end; padding: 12px 20px 18px; border-top: 1px solid var(--line); }
.privacy-panel { padding: 20px; }
.privacy-list { display: grid; gap: 10px; margin: 16px 0 20px; padding: 0; list-style: none; color: var(--muted); font-size: 9px; }
.privacy-list li { padding-left: 17px; position: relative; }
.privacy-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.privacy-list strong { color: var(--text-strong); }
.settings-toggle-form { display: grid; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.preference-switch { display: grid; grid-template-columns: auto 1fr; gap: 9px; align-items: start; cursor: pointer; }
.preference-switch input { margin-top: 3px; accent-color: var(--primary); }
.preference-switch span { display: flex; flex-direction: column; }
.preference-switch strong { color: var(--text-strong); font-size: 10px; }
.preference-switch small { color: var(--muted); font-size: 8px; }
.compact-empty { padding: 25px; }

.deadline-dialog { width: min(430px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow-md); }
.deadline-dialog::backdrop { background: rgba(4, 8, 18, .58); backdrop-filter: blur(2px); }
.deadline-dialog form { display: grid; gap: 15px; padding: 20px; }
.dialog-heading { display: flex; align-items: center; gap: 11px; }
.dialog-heading h2, .dialog-heading p { margin: 0; }
.calendar-dialog-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: var(--primary-soft); color: var(--primary-text); }
.deadline-dialog > form > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.deadline-dialog input { width: 100%; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.detail-main > h2 { margin: 25px 0 11px; font-size: 12px; }
.description { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); box-shadow: var(--shadow-xs); }
.description p { margin: 0; }
.timeline { position: relative; display: grid; gap: 9px; }
.timeline::before { content: ""; position: absolute; left: 17px; top: 24px; bottom: 24px; width: 1px; background: var(--line); }
.timeline-item { position: relative; margin-left: 36px; padding: 15px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.timeline-item::before { content: ""; position: absolute; left: -25px; top: 18px; width: 9px; height: 9px; border: 3px solid var(--app-bg); border-radius: 50%; background: var(--info); box-shadow: 0 0 0 1px var(--line); }
.timeline-note::before { background: var(--primary); }
.timeline-reply::before { background: var(--success); }
.timeline-item header { display: grid; grid-template-columns: 1fr auto; gap: 1px 14px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.timeline-item header strong { color: var(--text-strong); font-size: 11px; }
.timeline-item header span, .timeline-item time { color: var(--muted); font-size: 9px; }
.timeline-item time { grid-column: 2; grid-row: 1 / 3; }
.timeline-item h3 { margin: 0 0 8px; }
.mail-body { overflow-x: auto; color: var(--text); font-size: 11px; }
.detail-aside { position: sticky; top: 84px; }
.side-card { margin-bottom: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.side-card h2 { margin: 0 0 13px; font-size: 11px; letter-spacing: 0; }
.side-card form { display: grid; gap: 10px; }
.side-card dl { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; margin: 0 0 14px; }
.side-card dt { color: var(--muted); font-size: 9px; }
.side-card dd { margin: 0; color: var(--text-strong); font-size: 10px; font-weight: 570; overflow-wrap: anywhere; }
.ticket-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 760px) minmax(240px, 320px); gap: 18px; align-items: start; }
.form-card, .source-preview { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.form-card { display: grid; gap: 16px; }
.form-card > label { display: block; }
.source-preview { display: flex; flex-direction: column; }
.source-preview strong { color: var(--text-strong); font-size: 11px; }
.source-preview span, .source-preview p { color: var(--muted); font-size: 10px; }
.source-preview p { margin-bottom: 0; }
.empty-state { padding: 56px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.empty-state h2 { margin-top: 0; }

.hero { min-height: calc(100vh - 116px); display: grid; place-items: center; text-align: center; }
.hero > div { width: min(720px, 100%); }
.hero h1 { margin: 10px 0 18px; font-size: clamp(42px, 7vw, 78px); line-height: 1.02; letter-spacing: -.055em; }
.hero p:not(.eyebrow) { max-width: 580px; margin: 0 auto 26px; color: var(--muted); font-size: 16px; }
.narrow { max-width: 640px; margin: 80px auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 1050px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .page { padding-inline: 28px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .board-filters input[type="search"] { grid-column: 1 / -1; }
  .calendar-toolbar { grid-template-columns: 1fr auto; }
  .calendar-toolbar h2 { grid-column: 1 / -1; grid-row: 1; }
  .calendar-period-nav, .calendar-date-jump { grid-row: 2; }
}

@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand, .workspace-switcher, .sidebar-footer, .nav-label { display: none; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .nav-item { white-space: nowrap; }
  .nav-section-divider { display: none; }
  .tickettool-nav-group {
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: 3px;
  }
  .nav-submenu {
    min-width: max-content;
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 0;
    border-left: 0;
  }
  .nav-subitem {
    min-height: 38px;
    padding-inline: 10px;
    white-space: nowrap;
  }
  .nav-subitem-create { margin: 0; }
  .nav-item.is-active::before { left: 10px; right: 10px; top: auto; bottom: -10px; width: auto; height: 2px; border-radius: 2px 2px 0 0; }
  .utilitybar { top: 0; height: 58px; padding-inline: 18px; }
  .mobile-brand-mark { display: grid; width: 27px; height: 27px; }
  .utility-context small { display: none; }
  .page { padding: 26px 18px 60px; }
  .detail-grid, .form-layout { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .calendar-exceptions { grid-template-columns: 1fr; }
  .calendar-settings-grid { grid-template-columns: 1fr; }
  .calendar-integration-bar { align-items: flex-start; flex-direction: column; }
  .week-calendar { grid-template-columns: 1fr; overflow: visible; }
  .week-day { min-height: 105px; }
  .follow-up-panel { position: static; }
  .detail-aside { position: static; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type="search"] { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .utility-context > span:last-child { display: none; }
  .utility-actions { margin-left: auto; }
  .button-compact { font-size: 0; }
  .button-compact span { font-size: 15px; }
  .page-heading { flex-direction: column; }
  .filters { grid-template-columns: 1fr; }
  .filters input[type="search"] { grid-column: auto; }
  .mail-card { grid-template-columns: 34px minmax(0, 1fr); }
  .mail-avatar { width: 34px; height: 34px; }
  .mail-side { grid-column: 1 / -1; min-width: 0; align-items: flex-start; padding-left: 46px; }
  .mail-card .actions { justify-content: flex-start; }
  .theme-control select { min-width: 90px; }
  .public-topbar { padding-inline: 18px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-switcher { width: 100%; }
  .view-switcher a { min-width: 0; flex: 1; }
  .calendar-toolbar { display: flex; flex-direction: column; align-items: stretch; }
  .calendar-toolbar h2 { order: -1; }
  .calendar-period-nav, .calendar-date-jump { justify-content: center; }
  .calendar-date-jump input { width: 100%; }
  .calendar-date-jump label { flex: 1; }
  .calendar-integration-actions { align-items: flex-start; flex-direction: column; }
  .calendar-warning { align-items: flex-start; flex-direction: column; }
  .focus-ticket { grid-template-columns: 1fr; }
  .focus-ticket-actions { justify-content: space-between; }
}

/* Mijn tickettool */
.nav-symbol-support::before { inset: 2px 1px 3px; border-radius: 4px; }
.nav-symbol-support::after { left: 4px; bottom: 1px; width: 5px; height: 5px; border-width: 0 0 1.5px 1.5px; transform: skew(-25deg); }
.button.button-danger { border-color: var(--danger); background: var(--danger); color: #fff; }
.button.button-danger:hover { border-color: color-mix(in srgb, var(--danger) 82%, #000); background: color-mix(in srgb, var(--danger) 82%, #000); }
.pt-filters { grid-template-columns: minmax(250px, 1.5fr) repeat(6, minmax(120px, 1fr)) auto; }
.pt-ticket-table { min-width: 1120px; }
.pt-ticket-table td:last-child { width: auto; }
.pt-priority { display: inline-flex; min-height: 21px; align-items: center; padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 720; }
.pt-priority-low { background: var(--success-soft); color: var(--success); }
.pt-priority-normal { background: var(--info-soft); color: var(--info); }
.pt-priority-high { background: var(--warning-soft); color: var(--warning); }
.pt-priority-urgent { background: var(--danger-soft); color: var(--danger); }
.pt-unassigned, .pt-overdue, .pt-send-error { color: var(--danger); font-weight: 700; }
.pt-detail-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.pt-conversation { display: grid; gap: 12px; }
.pt-message { width: min(88%, 760px); padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-xs); }
.pt-message-incoming { justify-self: start; border-top-left-radius: 4px; }
.pt-message-outgoing { justify-self: end; border-top-right-radius: 4px; background: color-mix(in srgb, var(--primary-soft) 48%, var(--surface)); }
.pt-message-failed { border-color: color-mix(in srgb, var(--danger) 50%, var(--line)); }
.pt-message > header { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.pt-message > header div { min-width: 0; display: flex; flex-direction: column; }
.pt-message > header strong { color: var(--text-strong); font-size: 11px; }
.pt-message > header span, .pt-message > header time { color: var(--muted); font-size: 9px; }
.pt-message h3 { margin: 12px 0 7px; font-size: 12px; }
.pt-message-body { padding: 12px 0; color: var(--text); font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.pt-message-body p:first-child { margin-top: 0; }
.pt-message-body p:last-child { margin-bottom: 0; }
.pt-message-body .pt-inline-image {
  display: block;
  max-width: min(100%, 920px);
  height: auto;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pt-message-body .pt-inline-image:hover,
.pt-message-body .pt-inline-image:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: 0; }
.pt-image-lightbox-open { overflow: hidden; }
.pt-image-lightbox[hidden] { display: none; }
.pt-image-lightbox { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 58px 28px 28px; background: rgba(8, 18, 38, .88); backdrop-filter: blur(4px); }
.pt-image-lightbox-close { position: fixed; top: 18px; right: 22px; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; background: rgba(16, 34, 67, .86); color: #fff; cursor: pointer; font-size: 28px; line-height: 1; }
.pt-image-lightbox-close:hover,
.pt-image-lightbox-close:focus-visible { border-color: #fff; background: #fff; color: #102243; outline: 3px solid rgba(255, 255, 255, .28); }
.pt-image-lightbox-figure { display: grid; max-width: 100%; max-height: 100%; justify-items: center; gap: 10px; margin: 0; }
.pt-image-lightbox-image { display: block; max-width: min(94vw, 1800px); max-height: calc(100vh - 105px); width: auto; height: auto; border-radius: 10px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .45); object-fit: contain; }
.pt-image-lightbox-caption { max-width: min(92vw, 1000px); overflow: hidden; color: #fff; font-size: 11px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.pt-inline-image-unavailable { color: var(--muted); font-style: italic; }
.pt-message > footer { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 9px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.pt-send-status { font-weight: 720; }
.pt-send-sent { color: var(--success); }
.pt-send-failed { color: var(--danger); }
.pt-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pt-attachments a { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); color: var(--primary-text); font-size: 9px; font-weight: 670; text-decoration: none; }
.pt-attachments a:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.pt-attachment-unavailable { padding: 7px 9px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; font-weight: 650; }
.pt-selected-attachments { display: grid; gap: 5px; margin-top: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; }
.pt-selected-attachments ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pt-selected-attachments li { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--primary-text); }
.pt-remove-attachment { flex: 0 0 auto; padding: 3px 6px; border: 0; border-radius: 5px; background: transparent; color: var(--danger); cursor: pointer; font: inherit; font-size: 8px; font-weight: 700; }
.pt-remove-attachment:hover { background: var(--danger-soft); }
.pt-settings-button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); text-decoration: none; }
.pt-settings-button:hover, .pt-settings-button.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.pt-settings-page { display: grid; gap: 16px; width: min(1180px, 100%); margin: 0 auto; padding: 20px; }
.pt-settings-heading, .pt-settings-card > header, .pt-technical-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pt-settings-heading h1, .pt-settings-card h2 { margin: 2px 0 4px; }
.pt-settings-heading p, .pt-settings-coming-soon p, .pt-settings-security-note p, .pt-technical-footnote { margin: 0; color: var(--muted); }
.pt-settings-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.pt-settings-tabs a { padding: 9px 12px; border-radius: 7px; color: var(--muted); font-size: 10px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.pt-settings-tabs a:hover, .pt-settings-tabs a.is-active { background: var(--primary-soft); color: var(--primary); }
.pt-settings-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pt-settings-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pt-settings-split .pt-settings-form-grid { grid-template-columns: 1fr; }
.pt-secret-is-set { color: #168351 !important; font-weight: 700 !important; }
.pt-settings-test-form { display: flex; justify-content: flex-end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.pt-settings-card-heading { position: sticky; top: 64px; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -18px -18px 0; padding: 18px; border-bottom: 1px solid var(--line); border-radius: 12px 12px 0 0; background: color-mix(in srgb, var(--surface) 96%, transparent); backdrop-filter: blur(8px); }
.pt-settings-save-control { display: flex; align-items: center; gap: 10px; }
.pt-settings-unsaved { color: #a64b00; font-size: 9px; font-weight: 750; white-space: nowrap; }
.pt-settings-form { display: grid; gap: 18px; margin-top: 16px; }
.pt-settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pt-settings-form-grid > label:not(.pt-settings-checkbox) { display: grid; gap: 6px; color: var(--text-strong); font-size: 10px; font-weight: 700; }
.pt-settings-form-grid input:not([type="checkbox"]), .pt-settings-form-grid select, .pt-settings-form-grid textarea { width: 100%; }
.pt-settings-form-grid small { color: var(--muted); font-size: 9px; font-weight: 450; line-height: 1.45; }
.pt-settings-wide { grid-column: 1 / -1; }
.pt-settings-checkbox { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); cursor: pointer; }
.pt-settings-checkbox input { margin-top: 2px; }
.pt-settings-checkbox span { display: grid; gap: 3px; }
.pt-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.pt-settings-security-note { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-settings-coming-soon { min-height: 280px; display: flex; align-items: center; justify-content: center; flex-direction: column; text-align: center; }
.pt-settings-coming-soon p { max-width: 600px; }
.pt-settings-feature-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-weight: 850; }
.pt-heading-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.pt-heading-actions form { margin: 0; }
.pt-employee-page { width: min(1320px, 100%); }
.pt-employee-filters { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(190px, .55fr) minmax(190px, .55fr) auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pt-employee-filters label { display: grid; gap: 5px; color: var(--text-strong); font-size: 10px; font-weight: 700; }
.pt-employee-filters input, .pt-employee-filters select { width: 100%; }
.pt-employee-table-card { padding: 0; overflow: hidden; }
.pt-employee-table-wrap { overflow-x: auto; }
.pt-employee-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.pt-employee-table th { padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-subtle); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.pt-employee-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 11px; vertical-align: middle; }
.pt-employee-table tbody tr:last-child td { border-bottom: 0; }
.pt-employee-table tbody tr:hover { background: var(--surface-subtle); }
.pt-employee-table td a:not(.button) { display: grid; gap: 3px; color: var(--text-strong); text-decoration: none; }
.pt-employee-table td small { color: var(--muted); }
.pt-empty-cell { padding: 32px !important; color: var(--muted) !important; text-align: center; }
.pt-employee-status { display: inline-flex; align-items: center; width: max-content; padding: 4px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--muted); font-size: 9px; font-weight: 800; }
.pt-employee-status-active { background: var(--success-soft); color: var(--success); }
.pt-employee-status-waiting_for_login { background: var(--warning-soft); color: var(--warning); }
.pt-employee-status-inactive { background: var(--surface-subtle); color: var(--muted); }
.pt-employee-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-employee-detail-grid .pt-settings-card h2 { margin: 3px 0 14px; }
.pt-detail-list { display: grid; gap: 0; margin: 0; }
.pt-detail-list > div { display: grid; grid-template-columns: minmax(130px, .6fr) 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pt-detail-list dt { color: var(--muted); font-size: 10px; }
.pt-detail-list dd { margin: 0; color: var(--text-strong); font-size: 10px; font-weight: 700; }
.pt-workload-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.pt-workload-grid > div { display: grid; gap: 3px; padding: 13px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-subtle); text-align: center; }
.pt-workload-grid strong { color: var(--text-strong); font-size: 20px; }
.pt-workload-grid span, .pt-employee-future-card p, .pt-audit-list span { color: var(--muted); font-size: 9px; }
.pt-audit-list { display: grid; gap: 0; }
.pt-audit-list > div { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 10px; }
.pt-warning-card { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.pt-template-list, .pt-quick-reply-list { display: grid; gap: 10px; margin-top: 16px; }
.pt-template-card, .pt-quick-reply-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-subtle); }
.pt-template-card-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-template-card-main .pt-settings-feature-icon { flex: 0 0 auto; margin: 0; }
.pt-template-card h3, .pt-quick-reply-item h3 { margin: 0 0 4px; }
.pt-template-card p, .pt-quick-reply-item p { margin: 0; color: var(--muted); }
.pt-template-card-meta, .pt-quick-reply-item-actions, .pt-template-actions, .pt-template-history-actions { display: flex; align-items: center; gap: 8px; }
.pt-template-status { display: inline-flex; align-items: center; width: fit-content; padding: 5px 8px; border-radius: 999px; background: var(--surface-muted); color: var(--muted); font-size: 9px; font-weight: 800; }
.pt-template-status.is-active { background: #e5f7eb; color: #137333; }
.pt-quick-reply-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: 14px; }
.pt-quick-reply-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pt-quick-reply-item { align-items: flex-start; }
.pt-quick-reply-item.is-archived { opacity: .62; }
.pt-quick-reply-item > div:first-child { min-width: 0; }
.pt-quick-reply-item > div:first-child > span { color: var(--primary); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.pt-quick-reply-item small { color: var(--muted); }
.pt-template-editor-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 14px; }
.pt-template-sidebar { display: grid; align-content: start; gap: 14px; }
.pt-template-heading-status { display: flex; align-items: center; }
.pt-template-editing-version { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.pt-template-variables { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pt-template-variables button { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); color: var(--primary); font: 700 9px/1.2 monospace; cursor: pointer; }
.pt-template-variables button:hover { border-color: var(--primary); background: var(--primary-soft); }
.pt-signature-variable-panel { grid-column: 1 / -1; display: grid; gap: 10px; margin-top: -6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-signature-variable-panel > div:first-child { display: grid; gap: 3px; }
.pt-signature-variable-panel small { color: var(--muted); font-size: 9px; }
.pt-signature-variables { margin-top: 0; }
.pt-template-preview .pt-rich-text { max-height: 420px; overflow: auto; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-template-signature-note { margin: 12px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--primary-soft); color: var(--muted); font-size: 9px; }
.pt-template-actions { flex-wrap: wrap; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.pt-template-version-list { display: grid; gap: 8px; margin-top: 14px; }
.pt-template-version-list article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pt-template-version-list article > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-template-version-list small { width: 100%; color: var(--muted); }
.pt-template-version-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pt-template-version-actions .button.is-selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.pt-template-history-actions { justify-content: space-between; margin-top: 14px; }
.pt-quick-reply-picker { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 8px; margin: 12px 14px 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-quick-reply-picker label { color: var(--text-strong); font-size: 10px; font-weight: 800; }
.pt-quick-reply-picker select { min-width: 0; }
.pt-settings-metrics { margin-top: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pt-technical-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin-top: 16px; border-top: 1px solid var(--line); }
.pt-technical-details > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.pt-technical-details span { color: var(--muted); }
.pt-technical-footnote { margin-top: 14px; font-size: 9px; }
@media (max-width: 820px) {
  .pt-settings-page { padding: 12px; }
  .pt-settings-form-grid, .pt-settings-metrics, .pt-technical-details, .pt-settings-split { grid-template-columns: 1fr; }
  .pt-settings-heading, .pt-settings-actions { align-items: stretch; flex-direction: column; }
  .pt-heading-actions { align-items: stretch; flex-direction: column; }
  .pt-employee-filters, .pt-employee-detail-grid { grid-template-columns: 1fr; }
  .pt-workload-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pt-settings-card-heading { top: 60px; align-items: stretch; flex-direction: column; }
  .pt-settings-save-control { justify-content: space-between; }
  .pt-settings-save-control .button { flex: 1; }
  .pt-quick-reply-settings, .pt-template-editor-layout { grid-template-columns: 1fr; }
  .pt-template-card, .pt-quick-reply-item { align-items: stretch; flex-direction: column; }
  .pt-template-card-meta, .pt-quick-reply-item-actions { justify-content: space-between; }
  .pt-template-version-list article, .pt-template-version-actions { align-items: stretch; flex-direction: column; }
  .pt-quick-reply-picker { grid-template-columns: 1fr; }
}
.pt-original-message { margin-top: 10px; color: var(--muted); font-size: 9px; }
.pt-original-message summary { cursor: pointer; }
.pt-original-message pre { max-height: 280px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-subtle); color: var(--text); font: 9px/1.5 monospace; white-space: pre-wrap; }
.pt-history { display: grid; gap: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pt-history > div { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 9px; padding: 7px 0; }
.pt-history > div:not(:last-child)::after { content: ""; position: absolute; left: 5px; top: 20px; bottom: -8px; width: 1px; background: var(--line); }
.pt-history-dot { width: 11px; height: 11px; margin-top: 3px; border: 3px solid var(--primary-soft); border-radius: 50%; background: var(--primary); }
.pt-history p { display: flex; flex-direction: column; margin: 0; }
.pt-history strong { color: var(--text-strong); font-size: 10px; }
.pt-history small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.pt-compose-card textarea { min-height: 130px; }
.pt-compose-card input[type="file"] { padding: 7px; font-size: 9px; }
.pt-muted { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.pt-admin-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pt-admin-metrics .metric-card { align-items: flex-start; flex-direction: column; }
.pt-admin-metrics .metric-card strong { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }

@media (max-width: 1250px) {
  .pt-filters { grid-template-columns: repeat(4, minmax(130px, 1fr)); }
  .pt-filters input[type="search"] { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .pt-detail-grid { grid-template-columns: 1fr; }
  .pt-message { width: 94%; }
  .pt-admin-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .pt-filters { grid-template-columns: 1fr; }
  .pt-filters input[type="search"] { grid-column: auto; }
  .pt-message { width: 100%; }
  .pt-admin-metrics { grid-template-columns: 1fr; }
}

/* Mijn tickettool - zelfstandige supportdesk */
.personal-tickettool-mode .workspace-shell { height: 100vh; overflow: hidden; }
.pt-page {
  position: relative;
  width: 100%;
  max-width: none;
  height: calc(100vh - 64px);
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.pt-page.pt-page-scrollable {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
.pt-page-scrollable .pt-settings-card-heading { top: 0; }
.pt-page > .flash {
  position: absolute;
  z-index: 90;
  top: 14px;
  right: 18px;
  width: min(420px, calc(100% - 36px));
  margin: 0;
  box-shadow: var(--shadow-md);
}
.pt-supportdesk {
  min-height: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(290px, 350px) minmax(0, 1fr);
  background: var(--surface);
}
.pt-module-nav {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  overflow-y: auto;
  background: linear-gradient(175deg, #0a2d63 0%, #082653 57%, #061e43 100%);
  color: #ffffff;
  border-right: 1px solid rgba(255, 255, 255, .09);
}
.pt-module-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 7px;
}
.pt-module-brand > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-module-brand strong {
  color: #ffffff;
  font-size: 14px;
  letter-spacing: -.02em;
}
.pt-module-brand small {
  color: rgba(255, 255, 255, .62);
  font-size: 9px;
}
.pt-module-brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1681ff, #0358dd);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(0, 93, 232, .32);
}
.pt-create-ticket {
  width: 100%;
  min-height: 41px;
  margin: 22px 0 18px;
  border-color: #116df4;
  background: #116df4;
  color: #ffffff;
  box-shadow: 0 8px 22px rgba(0, 91, 230, .27);
}
.pt-create-ticket:hover {
  border-color: #2f82f5;
  background: #2f82f5;
}
.pt-module-links {
  display: grid;
  gap: 4px;
}
.pt-module-link {
  position: relative;
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, .82);
  font-size: 11px;
  font-weight: 570;
  text-decoration: none;
}
.pt-module-link:hover,
.pt-module-link.is-active {
  background: rgba(62, 143, 255, .16);
  color: #ffffff;
}
.pt-module-link.is-active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #2d87ff;
}
.pt-module-count {
  min-width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  color: rgba(255, 255, 255, .8);
  font-size: 8px;
  font-weight: 750;
}
.pt-module-link.is-active .pt-module-count {
  background: rgba(45, 135, 255, .26);
  color: #ffffff;
}
.pt-module-link-icon {
  position: relative;
  width: 16px;
  height: 16px;
  color: currentColor;
}
.pt-module-link-icon::before,
.pt-module-link-icon::after {
  content: "";
  position: absolute;
  border: 1.4px solid currentColor;
}
.pt-module-link-inbox::before,
.pt-module-link-mail::before {
  inset: 3px 1px 2px;
  border-radius: 3px;
}
.pt-module-link-inbox::after {
  left: 4px;
  right: 4px;
  bottom: 5px;
  height: 3px;
  border-width: 0 0 1.4px;
}
.pt-module-link-mail::after {
  left: 3px;
  top: 4px;
  width: 8px;
  height: 6px;
  border-width: 0 0 1.4px 1.4px;
  transform: rotate(-45deg);
}
.pt-module-link-user::before {
  left: 5px;
  top: 1px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pt-module-link-user::after {
  left: 2px;
  right: 2px;
  bottom: 1px;
  height: 6px;
  border-radius: 7px 7px 2px 2px;
}
.pt-module-link-team::before {
  left: 1px;
  top: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  box-shadow: 8px 1px 0 -1px #0b2a59, 8px 1px 0 0 currentColor;
}
.pt-module-link-team::after {
  left: 0;
  right: 0;
  bottom: 1px;
  height: 5px;
  border-radius: 6px 6px 2px 2px;
}
.pt-module-link-check::before {
  inset: 1px;
  border-radius: 4px;
}
.pt-module-link-check::after {
  left: 4px;
  top: 5px;
  width: 7px;
  height: 4px;
  border-width: 0 0 1.4px 1.4px;
  transform: rotate(-45deg);
}
.pt-module-link-settings::before {
  inset: 3px;
  border-radius: 50%;
  box-shadow: 0 -5px 0 -3px currentColor, 0 5px 0 -3px currentColor, 5px 0 0 -3px currentColor, -5px 0 0 -3px currentColor;
}
.pt-module-link-settings::after {
  inset: 6px;
  border-radius: 50%;
}
.pt-module-admin {
  display: grid;
  gap: 5px;
  margin-top: 26px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, .11);
}
.pt-module-admin > span {
  padding: 0 10px;
  color: rgba(255, 255, 255, .48);
  font-size: 8px;
  font-weight: 730;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.pt-module-mailbox {
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-top: auto;
  padding: 15px 8px 1px;
  border-top: 1px solid rgba(255, 255, 255, .11);
}
.pt-module-mailbox > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-module-mailbox strong,
.pt-module-mailbox small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-module-mailbox strong { color: #ffffff; font-size: 9px; }
.pt-module-mailbox small { color: rgba(255, 255, 255, .55); font-size: 8px; }
.pt-mailbox-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35d07f;
  box-shadow: 0 0 0 3px rgba(53, 208, 127, .14);
}

.pt-ticket-index {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.pt-ticket-index-header {
  min-height: 73px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--line);
}
.pt-ticket-index-header .eyebrow { margin-bottom: 3px; }
.pt-ticket-index-header h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 18px;
}
.pt-ticket-index-header h2 span {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 8px;
}
.pt-ticket-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
}
.pt-ticket-search input[type="search"] {
  min-width: 0;
  height: 37px;
  padding-left: 34px;
  font-size: 10px;
}
.pt-search-icon {
  position: absolute;
  z-index: 1;
  left: 25px;
  top: 24px;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}
.pt-search-icon::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -3px;
  width: 5px;
  border-top: 1.5px solid var(--muted);
  transform: rotate(45deg);
}
.pt-filter-menu {
  position: relative;
}
.pt-filter-menu summary {
  min-height: 37px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}
.pt-filter-menu summary::-webkit-details-marker { display: none; }
.pt-filter-menu summary::before {
  content: "";
  width: 11px;
  height: 8px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  box-shadow: inset 0 -3px 0 -2px currentColor;
}
.pt-filter-popover {
  position: absolute;
  z-index: 80;
  top: 44px;
  right: 0;
  width: min(280px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}
.pt-filter-popover select { padding-block: 7px; font-size: 9px; }
.pt-filter-actions { display: flex; gap: 6px; }
.pt-ticket-cards {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 10px;
  overflow-y: auto;
}
.pt-ticket-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.pt-ticket-card:hover {
  border-color: color-mix(in srgb, #1675ee 42%, var(--line));
  background: color-mix(in srgb, var(--info-soft) 38%, var(--surface));
}
.pt-ticket-card.is-selected {
  border-color: color-mix(in srgb, #1675ee 52%, var(--line));
  background: color-mix(in srgb, var(--info-soft) 62%, var(--surface));
  box-shadow: inset 3px 0 0 #1675ee, var(--shadow-sm);
}
.pt-ticket-card-top,
.pt-ticket-card-bottom {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pt-ticket-card-top strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-ticket-card-top time {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--muted);
  font-size: 8px;
}
.pt-ticket-card-person {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-ticket-card-bottom { min-height: 22px; margin-top: 3px; }
.pt-ticket-message-count {
  position: relative;
  margin-left: auto;
  padding-left: 15px;
  color: var(--muted);
  font-size: 8px;
}
.pt-ticket-message-count::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 9px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 3px;
}
.pt-ticket-message-count::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 3px;
  height: 3px;
  border-width: 0 0 1px 1px;
  border-style: solid;
  border-color: currentColor;
  transform: skew(-25deg);
}
.pt-index-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 12px 4px;
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}
.pt-index-empty > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-subtle);
  color: var(--muted);
  font-weight: 750;
}
.pt-index-empty strong { color: var(--text-strong); font-size: 11px; }
.pt-index-empty p { margin: 0; font-size: 9px; }

.pt-ticket-stage {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
}
.pt-stage-header {
  position: sticky;
  z-index: 12;
  top: 0;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}
.pt-stage-kicker,
.pt-stage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.pt-stage-kicker > span:first-child {
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
}
.pt-stage-actions form { margin: 0; }
.pt-stage-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding: 22px 22px 17px;
  border-bottom: 1px solid var(--line);
}
.pt-stage-title h1 { font-size: clamp(22px, 2.2vw, 30px); }
.pt-stage-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}
.pt-stage-title p strong { color: var(--text); }
.pt-stage-title > time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}
.pt-ticket-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 270px);
  align-items: start;
}
.pt-ticket-main {
  min-width: 0;
  display: grid;
  gap: 11px;
  padding: 20px;
  border-right: 1px solid var(--line);
}
.pt-ticket-summary {
  padding: 0 2px 4px;
}
.pt-ticket-summary > p {
  margin: 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.7;
}
.pt-ticket-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 0;
  padding: 15px 0 2px;
  border-top: 1px solid var(--line);
}
.pt-ticket-facts > div {
  display: grid;
  gap: 3px;
}
.pt-ticket-facts dt {
  color: var(--muted);
  font-size: 8px;
}
.pt-ticket-facts dd {
  margin: 0;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 650;
}
.pt-info-banner {
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid color-mix(in srgb, var(--info) 27%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--info-soft) 55%, var(--surface));
}
.pt-info-owner {
  border-color: color-mix(in srgb, var(--warning) 27%, var(--line));
  background: color-mix(in srgb, var(--warning-soft) 60%, var(--surface));
}
.pt-info-neutral {
  border-color: var(--line);
  background: var(--surface-subtle);
}
.pt-info-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--info-soft);
  color: var(--info);
  font-size: 10px;
  font-weight: 800;
}
.pt-info-owner .pt-info-icon {
  background: var(--warning-soft);
  color: var(--warning);
}
.pt-info-banner > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-info-banner strong { color: var(--text-strong); font-size: 10px; }
.pt-info-banner small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.pt-info-banner form { margin: 0; }
.pt-info-banner .link-button { font-size: 9px; font-weight: 700; }
.pt-activity-panel,
.pt-reply-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.pt-activity-panel > header {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.pt-activity-panel > header .eyebrow { margin-bottom: 2px; }
.pt-activity-panel > header h2 { margin: 0; font-size: 12px; }
.pt-activity-panel > header > span {
  color: var(--muted);
  font-size: 8px;
}
.pt-activity-list {
  display: grid;
  padding: 8px 14px 12px;
}
.pt-activity-item {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
}
.pt-activity-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 42px;
  bottom: -8px;
  width: 1px;
  background: var(--line);
}
.pt-activity-avatar {
  position: relative;
  z-index: 1;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--info-soft);
  color: var(--info);
  font-size: 9px;
  font-weight: 800;
}
.pt-activity-outgoing .pt-activity-avatar {
  background: var(--success-soft);
  color: var(--success);
}
.pt-activity-history .pt-activity-avatar {
  background: var(--surface-subtle);
  color: var(--muted);
}
.pt-activity-content { min-width: 0; }
.pt-activity-content > header {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.pt-activity-content > header > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-activity-content > header strong { color: var(--text-strong); font-size: 9px; }
.pt-activity-content > header small,
.pt-activity-content > header time {
  color: var(--muted);
  font-size: 8px;
}
.pt-activity-content > header time { flex: 0 0 auto; }
.pt-activity-content h3 { margin: 9px 0 0; font-size: 10px; }
.pt-activity-content .pt-message-body {
  margin-top: 8px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
  font-size: 9px;
}
.pt-activity-content > footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 8px;
}
.pt-activity-empty {
  padding: 25px 12px;
  color: var(--muted);
  text-align: center;
}
.pt-activity-empty strong { color: var(--text-strong); font-size: 10px; }
.pt-activity-empty p { margin: 4px 0 0; font-size: 8px; }
.pt-reply-tabs {
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}
.pt-reply-tabs h2 {
  align-self: stretch;
  display: flex;
  align-items: center;
  margin: 0;
  border-bottom: 2px solid #1473ee;
  color: var(--primary-text);
  font-size: 10px;
}
.pt-reply-tabs span { color: var(--muted); font-size: 8px; }
.pt-reply-panel form { padding: 10px; }
.pt-reply-panel textarea {
  min-height: 95px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  font-size: 10px;
}
.pt-file-field {
  display: block;
  padding: 7px 9px;
  border-top: 1px solid var(--line);
}
.pt-file-field > span { display: inline-block; margin: 0 8px 0 0; }
.pt-file-field input { padding: 5px; font-size: 8px; }
.pt-reply-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px 0;
  border-top: 1px solid var(--line);
}
.pt-reply-actions > span { color: var(--muted); font-size: 8px; }
.pt-ticket-aside {
  min-width: 0;
  position: sticky;
  top: 64px;
  padding: 17px;
}
.pt-aside-section {
  padding: 2px 0 17px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pt-aside-section:last-child { margin-bottom: 0; border-bottom: 0; }
.pt-aside-section h2 { margin: 0 0 11px; font-size: 11px; }
.pt-assignee {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}
.pt-assignee-avatar {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dff4b8;
  color: #417719;
  font-size: 9px;
  font-weight: 800;
}
.pt-assignee > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pt-assignee strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-assignee small { color: var(--muted); font-size: 8px; }
.pt-assignment-form {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.pt-assignment-form label { color: var(--muted); font-size: 8px; }
.pt-assignment-form select { padding-block: 7px; font-size: 8px; }
.pt-assignment-form .link-button { justify-self: start; font-size: 8px; }
.pt-aside-details {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 9px;
  margin: 0;
}
.pt-aside-details dt { color: var(--muted); font-size: 8px; }
.pt-aside-details dd {
  margin: 0;
  color: var(--text-strong);
  font-size: 8px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}
.pt-aside-actions { display: grid; gap: 7px; }
.pt-aside-actions form,
.pt-aside-actions button { width: 100%; }
.pt-archive-link { color: var(--danger); font-size: 9px; }
.pt-stage-empty {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 40px;
  text-align: center;
}
.pt-stage-empty-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--info-soft);
  color: var(--info);
  font-size: 18px;
  font-weight: 800;
}
.pt-stage-empty .eyebrow { margin: 8px 0 0; }
.pt-stage-empty p:not(.eyebrow) {
  max-width: 420px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 1400px) {
  .pt-supportdesk { grid-template-columns: minmax(275px, 325px) minmax(0, 1fr); }
  .pt-ticket-body-grid { grid-template-columns: 1fr; }
  .pt-ticket-main { border-right: 0; }
  .pt-ticket-aside {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    border-top: 1px solid var(--line);
  }
  .pt-aside-section { margin: 0; }
}

@media (max-width: 1050px) {
  .pt-supportdesk { grid-template-columns: minmax(255px, 300px) minmax(0, 1fr); }
  .pt-stage-title { align-items: flex-start; flex-direction: column; }
  .pt-stage-title > time { margin-top: -12px; }
  .pt-info-banner { grid-template-columns: 31px minmax(0, 1fr); }
  .pt-info-banner form { grid-column: 2; }
}

@media (max-width: 900px) {
  .personal-tickettool-mode .workspace-shell { height: auto; overflow: visible; }
  .pt-page { height: auto; min-height: calc(100vh - 116px); overflow: visible; }
  .pt-page > .flash { position: static; width: auto; margin: 12px; }
  .pt-supportdesk {
    height: auto;
    min-height: calc(100vh - 116px);
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
  }
  .pt-ticket-index,
  .pt-ticket-stage { height: min(730px, calc(100vh - 190px)); }
}

@media (max-width: 700px) {
  .pt-supportdesk { display: block; }
  .pt-module-nav { display: grid; }
  .pt-ticket-index,
  .pt-ticket-stage { height: auto; min-height: 0; }
  .pt-ticket-cards { max-height: 390px; }
  .pt-ticket-stage { border-top: 1px solid var(--line); }
  .pt-stage-header { position: static; }
  .pt-ticket-aside { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .pt-ticket-index-header { min-height: 62px; }
  .pt-ticket-search { grid-template-columns: 1fr; }
  .pt-search-icon { top: 24px; }
  .pt-filter-menu summary { justify-content: center; }
  .pt-filter-popover { position: static; width: 100%; margin-top: 7px; }
  .pt-stage-header,
  .pt-stage-title,
  .pt-ticket-main,
  .pt-ticket-aside { padding-inline: 14px; }
  .pt-stage-header,
  .pt-stage-title { align-items: flex-start; flex-direction: column; }
  .pt-stage-title > time { margin-top: -8px; }
  .pt-ticket-facts { grid-template-columns: 1fr; }
  .pt-activity-content > header { flex-direction: column; }
  .pt-reply-actions { align-items: stretch; flex-direction: column; }
  .pt-reply-actions .button { width: 100%; }
}

/* Mijn tickettool inbox */
.pt-inbox-layout {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  background: var(--surface);
}
.pt-inbox-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 0;
  background: var(--surface);
}
.pt-inbox-heading {
  min-height: 72px;
  display: flex;
  align-items: center;
  padding: 13px 20px 10px;
  border-bottom: 1px solid var(--line);
}
.pt-inbox-heading .eyebrow { margin-bottom: 3px; }
.pt-inbox-heading h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 20px;
}
.pt-inbox-heading h1 span {
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 8px;
}
.pt-inbox-toolbar {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) minmax(120px, .55fr) minmax(125px, .6fr) auto minmax(190px, .8fr);
  gap: 10px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.pt-inbox-search {
  position: relative;
  min-width: 0;
}
.pt-inbox-search input {
  width: 100%;
  height: 42px;
  padding: 9px 12px 9px 39px;
  font-size: 10px;
}
.pt-inbox-search .pt-search-icon {
  left: 15px;
  top: 14px;
}
.pt-toolbar-select,
.pt-toolbar-sort {
  min-width: 0;
}
.pt-toolbar-select select,
.pt-toolbar-sort select {
  width: 100%;
  height: 42px;
  padding-block: 8px;
  border-color: var(--line);
  background-color: var(--surface);
  font-size: 10px;
  font-weight: 600;
}
.pt-toolbar-sort select { color: var(--text); }
.pt-more-filters {
  position: relative;
}
.pt-more-filters > summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.pt-more-filters > summary::-webkit-details-marker { display: none; }
.pt-more-filters > summary::before {
  content: "";
  width: 12px;
  height: 9px;
  border-top: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  box-shadow: inset 0 -4px 0 -3px currentColor;
}
.pt-filter-active-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--info);
}
.pt-more-filter-popover {
  position: absolute;
  z-index: 85;
  top: 49px;
  right: 0;
  width: min(300px, calc(100vw - 36px));
  display: grid;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
}
.pt-more-filter-popover label {
  display: grid;
  gap: 5px;
}
.pt-more-filter-popover label > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}
.pt-more-filter-popover select {
  width: 100%;
  padding-block: 8px;
  font-size: 10px;
}
.pt-active-filter-bar {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 20px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--info-soft) 45%, var(--surface));
  color: var(--muted);
  font-size: 9px;
}
.pt-active-filter-bar a { font-weight: 700; text-decoration: none; }
.pt-inbox-table-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  scrollbar-width: thin;
}
.pt-inbox-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.pt-inbox-table th {
  height: 49px;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}
.pt-inbox-table th:first-child { width: 168px; padding-left: 18px; }
.pt-inbox-table th:nth-child(2) { width: 108px; }
.pt-inbox-table th:nth-child(3) { width: 72px; }
.pt-inbox-table th:nth-child(4) { width: 98px; }
.pt-inbox-table th:nth-child(5) { width: 108px; }
.pt-inbox-table th:nth-child(6) { width: 75px; }
.pt-inbox-table th:nth-child(7) { width: 98px; }
.pt-inbox-table th:last-child { width: 98px; }
.pt-inbox-table td {
  height: 67px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 9px;
  vertical-align: middle;
}
.pt-inbox-table td:first-child {
  position: relative;
  padding-left: 18px;
}
.pt-inbox-table tbody tr:hover td {
  background: color-mix(in srgb, var(--info-soft) 35%, var(--surface));
}
.pt-inbox-clickable-row { cursor: pointer; }
.pt-inbox-clickable-row:focus-visible td {
  outline: 2px solid var(--info);
  outline-offset: -2px;
}
.pt-inbox-table tbody tr.is-selected td {
  background: color-mix(in srgb, var(--info-soft) 70%, var(--surface));
}
.pt-inbox-table tbody tr.is-selected td:first-child {
  box-shadow: inset 3px 0 0 #1473ee;
}
.pt-unread-dot {
  position: absolute;
  left: 9px;
  top: 29px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line-strong);
}
.pt-unread-dot.is-unread {
  background: #1473ee;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--info-soft) 80%, transparent);
}
.pt-table-ticket-link {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 7px;
  color: var(--text);
  text-decoration: none;
}
.pt-table-ticket-link strong {
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 730;
}
.pt-table-ticket-link span,
.pt-table-primary {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-inbox-table td small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pt-table-unassigned { color: var(--muted); font-style: italic; }
.pt-inbox-status {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.pt-inbox-status-todo,
.pt-inbox-status-in_progress {
  background: var(--info-soft);
  color: var(--info);
}
.pt-inbox-status-waiting {
  background: #f1eaff;
  color: #6941c6;
}
.pt-inbox-status-completed {
  background: var(--success-soft);
  color: var(--success);
}
.pt-row-action {
  min-width: 29px;
  min-height: 29px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
}
.pt-row-action:hover { background: var(--surface-hover); }
.pt-inbox-empty {
  height: 220px !important;
  text-align: center;
}
.pt-inbox-empty strong,
.pt-inbox-empty span { display: block; }
.pt-inbox-empty strong { color: var(--text-strong); font-size: 12px; }
.pt-inbox-empty span { margin-top: 4px; color: var(--muted); }
.pt-inbox-footer {
  flex: 0 0 auto;
  min-height: 45px;
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
}
.pt-inbox-preview {
  min-width: 0;
  height: 100%;
  padding: 22px 20px;
  overflow-y: auto;
  background: var(--surface);
}
.pt-inbox-preview > h2 {
  margin: 0 0 27px;
  font-size: 13px;
}
.pt-preview-ticket-id {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}
.pt-inbox-preview > h3 {
  margin: 8px 0 13px;
  font-size: 18px;
  line-height: 1.25;
}
.pt-preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}
.pt-preview-details {
  display: grid;
  gap: 18px;
  margin: 0;
}
.pt-preview-detail {
  position: relative;
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 10px;
  padding-left: 0;
}
.pt-preview-detail::before,
.pt-preview-detail::after {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  place-self: start center;
}
.pt-preview-detail::before {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}
.pt-preview-person::after {
  width: 20px;
  height: 9px;
  margin-top: 17px;
  border: 1.5px solid var(--muted);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
.pt-preview-calendar::before {
  border-radius: 3px;
}
.pt-preview-calendar::after {
  width: 12px;
  height: 1px;
  margin-top: 8px;
  border-top: 1.5px solid var(--muted);
  box-shadow: 0 4px 0 var(--muted);
}
.pt-preview-clock::after {
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border-width: 0 0 1.5px 1.5px;
  border-style: solid;
  border-color: var(--muted);
}
.pt-preview-detail dt {
  grid-column: 2;
  color: var(--muted);
  font-size: 9px;
}
.pt-preview-detail dd {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  margin: 1px 0 0;
}
.pt-preview-detail dd strong {
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-size: 10px;
  font-weight: 650;
}
.pt-preview-detail dd span {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 8px;
}
.pt-preview-summary {
  margin-top: 24px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}
.pt-preview-summary h3 {
  position: relative;
  margin: 0 0 7px;
  padding-left: 25px;
  font-size: 10px;
}
.pt-preview-summary h3::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 13px;
  height: 16px;
  border: 1.5px solid var(--muted);
  border-radius: 2px;
}
.pt-preview-summary p {
  margin: 0;
  color: var(--text);
  font-size: 9px;
  line-height: 1.55;
}
.pt-preview-open {
  width: 100%;
  min-height: 42px;
  margin-top: 25px;
}
.pt-preview-help {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
}
.pt-preview-empty {
  display: grid;
  gap: 5px;
  padding: 40px 5px;
  color: var(--muted);
  text-align: center;
}
.pt-preview-empty strong { color: var(--text-strong); }
.pt-preview-empty p { margin: 0; font-size: 9px; }

.pt-open-ticket-page {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
}
.pt-open-ticket-stage {
  min-width: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--surface);
}
.pt-back-to-inbox { margin-right: 4px; }

/* Geopend ticket: rustige detailweergave met gesprek en ticketgegevens naast elkaar. */
.pt-open-ticket-page {
  height: 100%;
  overflow: hidden;
  background: var(--app-bg);
}
.pt-open-ticket-stage {
  height: 100%;
  overflow-y: auto;
  padding: clamp(22px, 3vw, 42px) clamp(18px, 3vw, 48px) 56px;
  background: var(--app-bg);
}
.pt-ticket-hero,
.pt-ticket-body-grid {
  width: min(100%, 1400px);
  margin-inline: auto;
}
.pt-ticket-hero { margin-bottom: 20px; }
.pt-ticket-hero > .pt-back-to-inbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 19px;
  color: var(--primary-text);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.pt-ticket-hero > .pt-back-to-inbox:hover { text-decoration: underline; }
.pt-ticket-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 26px;
}
.pt-ticket-heading { min-width: 0; }
.pt-ticket-identifiers,
.pt-stage-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.pt-ticket-number {
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .01em;
}
.pt-ticket-heading h1 {
  margin: 8px 0 0;
  font-size: clamp(25px, 2.5vw, 36px);
  line-height: 1.12;
}
.pt-ticket-subtitle {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.pt-ticket-subtitle strong { color: var(--text); }
.pt-stage-actions { justify-content: flex-end; }
.pt-stage-actions form { margin: 0; }
.pt-stage-actions .button { min-height: 40px; padding-inline: 15px; }
.pt-ticket-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 326px);
  align-items: start;
  gap: 22px;
}
.pt-ticket-main {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
}
.pt-description-card,
.pt-conversation-card,
.pt-reply-panel,
.pt-ticket-aside-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.pt-description-card { padding: 18px 20px 20px; }
.pt-card-heading,
.pt-aside-card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pt-card-heading h2,
.pt-aside-card-heading h2 { margin: 0; font-size: 15px; }
.pt-card-heading span { color: var(--muted); font-size: 10px; }
.pt-rich-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.pt-rich-text p { margin: 0 0 10px; }
.pt-rich-text p:last-child { margin-bottom: 0; }
.pt-rich-text strong { color: var(--text-strong); font-weight: 750; }
.pt-rich-text em { font-style: italic; }
.pt-rich-text ul,
.pt-rich-text ol { margin: 8px 0 12px; padding-left: 23px; }
.pt-rich-text li { margin: 3px 0; }
.pt-rich-text blockquote {
  margin: 10px 0;
  padding: 8px 13px;
  border-left: 3px solid var(--primary);
  color: var(--muted);
  background: var(--surface-subtle);
}
.pt-rich-text a { color: var(--primary-text); font-weight: 650; }
.pt-rich-text h2,
.pt-rich-text h3,
.pt-rich-text h4 { margin: 16px 0 7px; color: var(--text-strong); line-height: 1.3; }
.pt-rich-text h2 { font-size: 1.28em; }
.pt-rich-text h3 { font-size: 1.14em; }
.pt-rich-text h4 { font-size: 1.04em; }
.pt-rich-text s { color: var(--muted); }
.pt-rich-text hr { margin: 16px 0; border: 0; border-top: 1px solid var(--line); }
.pt-ticket-notices { display: grid; gap: 8px; }
.pt-ticket-notices .pt-info-banner { padding: 10px 12px; }
.pt-ticket-notices .pt-info-icon { width: 28px; height: 28px; }
.pt-ticket-notices .pt-info-banner strong { font-size: 11px; }
.pt-ticket-notices .pt-info-banner small { font-size: 9px; }
.pt-conversation-card { overflow: hidden; }
.pt-conversation-card > header {
  min-height: 66px;
  padding: 14px 20px;
  background: var(--surface);
}
.pt-conversation-card > header h2 { font-size: 16px; }
.pt-conversation-card > header > span { font-size: 10px; }
.pt-timeline-controls {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-subtle);
}
.pt-timeline-controls a {
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-decoration: none;
}
.pt-timeline-controls a:hover,
.pt-timeline-controls a.is-active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow-xs);
}
.pt-conversation-card .pt-activity-list { padding: 9px 20px 16px; }
.pt-conversation-card .pt-activity-item { padding: 14px 0; }
.pt-conversation-card .pt-activity-item:not(:last-child)::after { top: 53px; bottom: -10px; }
.pt-conversation-card .pt-activity-avatar { width: 36px; height: 36px; font-size: 11px; }
.pt-conversation-card .pt-activity-item { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.pt-conversation-card .pt-activity-content > header strong { font-size: 12px; }
.pt-conversation-card .pt-activity-content > header small,
.pt-conversation-card .pt-activity-content > header time { font-size: 10px; }
.pt-conversation-card .pt-activity-content h3 { margin-top: 10px; font-size: 13px; }
.pt-conversation-card .pt-message-body {
  margin-top: 9px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.6;
}
.pt-conversation-card .pt-activity-content > footer { font-size: 9px; }
.pt-conversation-card .pt-rich-text ul,
.pt-conversation-card .pt-rich-text ol { margin-top: 5px; margin-bottom: 7px; }
.pt-reply-panel { overflow: hidden; }
.pt-reply-tabs { min-height: 50px; padding-inline: 18px; }
.pt-reply-tabs h2 { font-size: 12px; }
.pt-reply-tabs span { font-size: 9px; }
.pt-reply-panel form { padding: 0 14px 14px; }
.pt-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 11px 4px 5px;
  border-bottom: 1px solid var(--line);
}
.pt-editor-toolbar-rich {
  width: 100%;
  margin-top: 5px;
  padding: 6px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--surface-subtle);
}
.pt-editor-toolbar-rich + textarea {
  margin-top: 0;
  border-radius: 0 0 8px 8px;
}
.pt-editor-separator {
  width: 1px;
  height: 20px;
  margin: 0 3px;
  background: var(--line);
}
.pt-editor-toolbar button {
  min-width: 30px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}
.pt-editor-toolbar button:hover,
.pt-editor-toolbar button:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-subtle);
  color: var(--text-strong);
}
.pt-reply-panel textarea {
  min-height: 128px;
  padding: 12px 4px;
  font-size: 13px;
  line-height: 1.55;
}
.pt-editor-help {
  display: block;
  padding: 0 4px 8px;
  color: var(--muted);
  font-size: 10px;
}
.pt-ai-rewrite[hidden],
.pt-ai-rewrite-review[hidden],
.pt-ai-rewrite-error[hidden],
.pt-ai-restore[hidden] { display: none !important; }
.pt-ai-rewrite {
  margin: 10px 4px 4px;
  padding: 12px;
  border: 1px solid #bdd0ff;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f8ff, #fff);
}
.pt-ai-rewrite-controls { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.pt-ai-rewrite-controls label { display: grid; min-width: min(300px, 100%); gap: 5px; color: var(--text-strong); font-size: 10px; font-weight: 800; }
.pt-ai-rewrite-controls select { min-width: 220px; }
.pt-ai-rewrite-hint { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.pt-ai-rewrite-error { margin: 10px 0 0; padding: 9px 11px; border: 1px solid #f5b8b2; border-radius: 8px; background: #fff3f1; color: #a4261d; font-size: 10px; }
.pt-ai-rewrite-review { margin-top: 12px; padding-top: 12px; border-top: 1px solid #d7e2ff; }
.pt-ai-rewrite-review > header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.pt-ai-rewrite-review h3 { margin: 2px 0 0; font-size: 14px; }
.pt-ai-rewrite-review > header > p { max-width: 310px; margin: 0; color: #725400; font-size: 9px; text-align: right; }
.pt-ai-rewrite-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.pt-ai-rewrite-comparison article { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pt-ai-rewrite-comparison article:last-child { border-color: #9db9ff; background: #f3f7ff; }
.pt-ai-rewrite-comparison h4 { margin: 0 0 8px; font-size: 10px; }
.pt-ai-rewrite-comparison pre { max-height: 280px; margin: 0; overflow: auto; color: var(--text); font: inherit; font-size: 11px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pt-ai-rewrite-review footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pt-knowledge-page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; }
.pt-knowledge-filters { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, .35fr) auto; gap: 10px; align-items: end; padding: 14px; }
.pt-knowledge-filters label, .pt-knowledge-form label { display: grid; gap: 6px; color: var(--text-strong); font-size: 11px; font-weight: 800; }
.pt-knowledge-list { display: grid; gap: 10px; padding: 14px; }
.pt-knowledge-card { display: flex; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; }
.pt-knowledge-card:hover { border-color: color-mix(in srgb, var(--primary) 42%, var(--line)); box-shadow: var(--shadow-xs); }
.pt-knowledge-card h2 { margin: 8px 0 5px; font-size: 16px; }
.pt-knowledge-card p { margin: 0; color: var(--muted); }
.pt-knowledge-card small { flex: 0 0 auto; color: var(--muted); }
.pt-knowledge-form { display: grid; gap: 15px; padding: 18px; }
.pt-knowledge-form textarea { min-height: 140px; }
.pt-knowledge-form label:nth-of-type(3) textarea { min-height: 240px; }
.pt-knowledge-form footer, .pt-knowledge-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pt-knowledge-detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); gap: 14px; }
.pt-knowledge-detail-grid main { display: grid; gap: 14px; }
.pt-knowledge-content { padding: 18px; }
.pt-knowledge-content > div { margin-top: 12px; line-height: 1.65; }
.pt-knowledge-content footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); }
.pt-version-list { align-self: start; padding: 16px; }
.pt-version-list h2 { margin: 4px 0 12px; }
.pt-version-list > a { display: grid; gap: 3px; padding: 11px; border-radius: 8px; color: inherit; text-decoration: none; }
.pt-version-list > a.is-active { background: var(--primary-soft); color: var(--primary-text); }
.pt-version-list small { color: var(--muted); }
.pt-knowledge-picker { margin: 10px 14px 0; }
.pt-knowledge-picker-panel { margin-top: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-sm); }
.pt-knowledge-picker-panel > header { display: flex; justify-content: space-between; gap: 12px; }
.pt-knowledge-picker-panel h3 { margin: 3px 0 0; }
.pt-knowledge-picker-search { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.pt-knowledge-search-results { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.pt-knowledge-search-results article { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-knowledge-search-results h4 { margin: 0 0 5px; }
.pt-knowledge-search-results p { margin: 0 0 6px; color: var(--muted); }
.pt-knowledge-search-results article > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.pt-ai-suggest { border-color: #b7c9ff; background: color-mix(in srgb, var(--primary-soft) 46%, var(--surface)); }
.pt-ai-suggest-proposal { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); font-size: 11px; line-height: 1.6; }
.pt-ai-suggest-proposal p { margin: 0 0 11px; }
.pt-ai-suggest-proposal p:last-child { margin-bottom: 0; }
.pt-ai-suggest-proposal ol,
.pt-ai-suggest-proposal ul { display: grid; gap: 8px; margin: 10px 0 13px; padding-left: 24px; }
.pt-ai-suggest-proposal li { padding-left: 3px; }
.pt-ai-suggest-proposal a,
.pt-ai-suggest-sources a { color: var(--primary); font-weight: 700; overflow-wrap: anywhere; }
.pt-ai-suggest-questions, .pt-ai-suggest-sources { margin-top: 12px; }
.pt-ai-suggest-questions h4, .pt-ai-suggest-sources h4 { margin: 0 0 8px; }
.pt-ai-suggest-sources ul { display: grid; gap: 6px; margin: 0; padding-left: 18px; }
.pt-ai-suggest-questions article { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pt-ai-suggest-questions p { margin: 0; }
.pt-ai-suggest-warnings { margin-top: 10px; padding: 10px; border: 1px solid #efcf78; border-radius: 8px; background: #fff9e7; color: #725400; }
.pt-ai-suggest-sources ul { margin: 0; padding-left: 20px; }
.pt-ai-restore { margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--primary); cursor: pointer; font-size: 10px; font-weight: 750; text-decoration: underline; }
.pt-reply-actions { padding: 10px 4px 0; }
.pt-reply-actions > span { font-size: 10px; }
.pt-ticket-aside { position: sticky; top: 20px; padding: 0; }
.pt-ticket-aside-card { padding: 20px; }
.pt-aside-card-heading { display: block; margin-bottom: 18px; }
.pt-aside-card-heading .eyebrow { margin-bottom: 4px; }
.pt-aside-card-heading h2 { font-size: 17px; }
.pt-aside-section { padding: 0 0 18px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.pt-aside-section:last-child { margin-bottom: 0; border-bottom: 0; }
.pt-aside-section h3 { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.pt-person-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; }
.pt-person-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); font-size: 10px; font-weight: 800; }
.pt-person-avatar-assignee { background: var(--success-soft); color: var(--success); }
.pt-person-row > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.pt-person-row strong { color: var(--text-strong); font-size: 11px; overflow-wrap: anywhere; }
.pt-person-row small { margin-top: 2px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.pt-aside-details { grid-template-columns: minmax(110px, 1fr) minmax(0, 1fr); gap: 11px 12px; }
.pt-aside-details dt { color: var(--muted); font-size: 10px; }
.pt-aside-details dd { font-size: 10px; }
.pt-aside-details .status,
.pt-aside-details .pt-priority { justify-self: end; }
.pt-aside-notices p { display: grid; gap: 2px; margin: 0 0 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-subtle); }
.pt-aside-notices p:last-child { margin-bottom: 0; }
.pt-aside-notices strong { color: var(--text-strong); font-size: 10px; }
.pt-aside-notices span { color: var(--muted); font-size: 9px; }
.pt-aside-admin h3 { color: var(--text-strong); }

@media (max-width: 980px) {
  .pt-ticket-body-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; }
  .pt-ticket-hero-row { flex-direction: column; }
  .pt-stage-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .pt-open-ticket-stage { padding: 20px 14px 40px; }
  .pt-ticket-body-grid { grid-template-columns: 1fr; }
  .pt-ticket-aside { position: static; }
  .pt-ticket-aside-card { padding: 17px; }
}
@media (max-width: 520px) {
  .pt-ticket-heading h1 { font-size: 25px; }
  .pt-ticket-subtitle { font-size: 10px; }
  .pt-stage-actions { width: 100%; }
  .pt-stage-actions .button,
  .pt-stage-actions form { flex: 1 1 auto; }
  .pt-stage-actions form .button { width: 100%; }
  .pt-description-card { padding: 16px; }
  .pt-conversation-card .pt-activity-list { padding-inline: 14px; }
  .pt-conversation-card .pt-activity-content > header { flex-direction: column; gap: 3px; }
  .pt-reply-actions { align-items: stretch; flex-direction: column; }
  .pt-reply-actions .button { width: 100%; }
}

@media (max-width: 1500px) {
  .pt-inbox-toolbar {
    grid-template-columns: minmax(230px, 1fr) repeat(3, minmax(105px, auto));
  }
  .pt-toolbar-sort {
    grid-column: 1 / -1;
    width: min(230px, 100%);
    justify-self: end;
  }
}

@media (max-width: 900px) {
  body.personal-tickettool-mode,
  .personal-tickettool-mode .app-shell,
  .personal-tickettool-mode .workspace-shell {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .pt-inbox-layout {
    height: auto;
    display: block;
    max-width: 100%;
    overflow-x: hidden;
  }
  .pt-inbox-main {
    min-height: 650px;
    border-right: 0;
  }
  .pt-inbox-table-scroll { min-height: 400px; }
  .pt-inbox-preview {
    height: auto;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 650px) {
  .pt-inbox-heading { min-height: 64px; padding-inline: 14px; }
  .pt-inbox-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px 14px;
  }
  .pt-inbox-search,
  .pt-toolbar-sort {
    grid-column: 1 / -1;
    width: 100%;
  }
  .pt-more-filters > summary { white-space: normal; }
  .pt-more-filter-popover {
    position: fixed;
    top: 150px;
    left: 14px;
    right: 14px;
    width: auto;
  }
  .pt-active-filter-bar { padding-inline: 14px; }
  .pt-inbox-footer { padding-inline: 14px; }
  .pt-inbox-preview { padding: 20px 16px; }
}

/* Detailpagina-overrides komen na de algemene supportdesk-breakpoints. */
.pt-open-ticket-page { height: 100%; overflow: hidden; }
.pt-open-ticket-stage { height: 100%; overflow-y: auto; }
.pt-ticket-body-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 326px); }
.pt-ticket-main { border-right: 0; }
.pt-ticket-aside { display: block; position: sticky; top: 20px; }
@media (max-width: 980px) {
  .pt-ticket-body-grid { grid-template-columns: minmax(0, 1fr) 290px; }
  .pt-ticket-aside { display: block; position: sticky; top: 20px; }
}
@media (max-width: 760px) {
  .pt-ticket-body-grid { grid-template-columns: 1fr; }
  .pt-ticket-aside { display: block; position: static; }
}

/* Chatweergave: berichten als duidelijke links/rechts-bubbels met interne notities ertussen. */
.pt-conversation-card .pt-activity-list { gap: 2px; }
.pt-conversation-card .pt-activity-item { position: relative; align-items: start; }
.pt-conversation-card .pt-activity-item::after { display: none; }
.pt-conversation-card .pt-activity-content {
  max-width: min(78%, 720px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}
.pt-conversation-card .pt-activity-incoming .pt-activity-content {
  justify-self: start;
  border-top-left-radius: 4px;
  background: var(--surface);
}
.pt-conversation-card .pt-activity-outgoing {
  grid-template-columns: minmax(0, 1fr) 36px;
}
.pt-conversation-card .pt-activity-outgoing .pt-activity-avatar { order: 2; }
.pt-conversation-card .pt-activity-outgoing .pt-activity-content {
  order: 1;
  justify-self: end;
  border-color: color-mix(in srgb, var(--info) 28%, var(--line));
  border-top-right-radius: 4px;
  background: color-mix(in srgb, var(--info-soft) 72%, var(--surface));
}
.pt-conversation-card .pt-activity-system,
.pt-conversation-card .pt-activity-history {
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  margin-inline: 12%;
}
.pt-conversation-card .pt-activity-system .pt-activity-avatar,
.pt-conversation-card .pt-activity-history .pt-activity-avatar { display: none; }
.pt-conversation-card .pt-activity-system .pt-activity-content,
.pt-conversation-card .pt-activity-history .pt-activity-content {
  max-width: none;
  padding: 10px 14px;
  border-color: #f3d98b;
  border-radius: 9px;
  background: #fff8df;
  box-shadow: none;
}
.pt-conversation-card .pt-activity-content > header { margin: 0 0 8px; }
.pt-conversation-card .pt-activity-content > header small { margin-left: 7px; color: var(--muted); }
.pt-conversation-card .pt-activity-content h3 { margin: 0 0 7px; }
.pt-conversation-card .pt-message-body { margin: 0; padding: 0; background: transparent; }
.pt-conversation-card .pt-activity-content > footer { margin-top: 8px; }
.pt-conversation-card .pt-activity-system .pt-message-body,
.pt-conversation-card .pt-activity-history .pt-message-body { color: var(--text); }
.pt-conversation-card .pt-activity-history .pt-activity-content > header { margin-bottom: 0; }
.pt-conversation-card .pt-activity-history .pt-activity-content > header strong::before { content: "🔒 "; }
.pt-conversation-card .pt-activity-history .pt-activity-content > header small { display: block; margin: 3px 0 0; }
.pt-composer-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}
.pt-composer-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 9px;
  align-items: center;
  padding: 12px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.pt-composer-tab > span { grid-row: span 2; font-size: 16px; }
.pt-composer-tab strong { color: var(--text-strong); font-size: 11px; }
.pt-composer-tab small { color: var(--muted); font-size: 9px; }
.pt-composer-tab:hover,
.pt-composer-tab:focus-visible { background: var(--surface); }
.pt-composer-tab.is-active { border-bottom-color: var(--primary); background: var(--surface); }
.pt-composer-tab-note.is-active { border-bottom-color: #d69b18; background: #fff8df; }
.pt-composer-visibility { color: var(--muted); font-size: 10px; }
.pt-reply-actions .button-note { border-color: #c48b0c; background: #1d3d80; }
@media (max-width: 600px) {
  .pt-conversation-card .pt-activity-content { max-width: 88%; }
  .pt-conversation-card .pt-activity-system,
  .pt-conversation-card .pt-activity-history { margin-inline: 0; }
  .pt-composer-tabs { grid-template-columns: 1fr; }
  .pt-composer-tab { border-bottom: 1px solid var(--line); }
  .pt-composer-tab.is-active { border-bottom-color: var(--primary); }
  .pt-ai-rewrite-controls { align-items: stretch; flex-direction: column; }
  .pt-ai-rewrite-controls select,
  .pt-ai-rewrite-controls .button { width: 100%; }
  .pt-ai-rewrite-comparison { grid-template-columns: 1fr; }
  .pt-ai-rewrite-review > header { display: block; }
  .pt-ai-rewrite-review > header > p { margin-top: 7px; text-align: left; }
  .pt-knowledge-page { width: min(100% - 20px, 1180px); padding-top: 14px; }
  .pt-knowledge-filters, .pt-knowledge-detail-grid { grid-template-columns: 1fr; }
  .pt-knowledge-card { flex-direction: column; }
  .pt-knowledge-picker-search { grid-template-columns: 1fr; }
}
