:root {
  color-scheme: dark;
  --bg-0: #050a14;
  --bg-1: #08111f;
  --bg-2: #101b33;
  --bg-3: #162544;
  --surface: rgba(255, 255, 255, .105);
  --surface-hover: rgba(255, 255, 255, .155);
  --surface-strong: rgba(17, 30, 53, .9);
  --glass: rgba(255, 255, 255, .12);
  --glass-strong: rgba(255, 255, 255, .19);
  --stroke: rgba(255, 255, 255, .16);
  --stroke-strong: rgba(255, 255, 255, .28);
  --text: #f8fbff;
  --muted: rgba(234, 243, 255, .72);
  --soft: rgba(234, 243, 255, .52);
  --primary: #60a5fa;
  --primary-strong: #3b82f6;
  --primary-deep: #2563eb;
  --cyan: #38bdf8;
  --violet: #a78bfa;
  --pink: #f472b6;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #fb7185;
  --info-bg: rgba(96, 165, 250, .16);
  --success-bg: rgba(74, 222, 128, .15);
  --warning-bg: rgba(251, 191, 36, .15);
  --danger-bg: rgba(251, 113, 133, .16);
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, .18);
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --sidebar-width: 278px;
  --topbar-height: 76px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --focus: 0 0 0 3px rgba(96, 165, 250, .44);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--bg-0);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background:
    radial-gradient(1100px 720px at 8% -5%, rgba(56, 189, 248, .16), transparent 58%),
    radial-gradient(900px 650px at 100% 20%, rgba(96, 165, 250, .2), transparent 52%),
    radial-gradient(900px 680px at 55% 118%, rgba(236, 72, 153, .1), transparent 48%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1) 52%, var(--bg-0));
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: #9bd2ff;
}

img {
  max-width: 100%;
}

svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.16;
  letter-spacing: -.025em;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(1.72rem, 3vw, 2.45rem);
}

h2 {
  margin-bottom: 7px;
  font-size: clamp(1.28rem, 2.2vw, 1.65rem);
}

h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9999;
  transform: translateY(-160%);
  padding: 10px 14px;
  border-radius: 10px;
  color: #08111f;
  background: #fff;
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus) !important;
}

/* Route changes focus the main landmark for screen readers. It is not a
   control: keep its focus without drawing a frame around the entire page. */
#mainContent:focus,
#mainContent:focus-visible {
  outline: none;
  box-shadow: none !important;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: .48;
  animation: float 18s ease-in-out infinite;
  transform: translate3d(0, 0, 0);
}

.orb-one {
  width: 310px;
  height: 310px;
  left: -100px;
  top: 7%;
  background: rgba(59, 130, 246, .28);
}

.orb-two {
  width: 260px;
  height: 260px;
  right: -70px;
  top: 29%;
  background: rgba(14, 165, 233, .17);
  animation-delay: -6s;
}

.orb-three {
  width: 360px;
  height: 360px;
  left: 35%;
  bottom: -150px;
  background: rgba(236, 72, 153, .13);
  animation-delay: -11s;
}

@keyframes float {
  50% { transform: translate3d(0, -20px, 0) scale(1.045); }
}

.glass {
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255, 255, 255, .145), rgba(255, 255, 255, .075));
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  backdrop-filter: blur(24px) saturate(140%);
}

.app-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  border-width: 0 1px 0 0;
  border-radius: 0;
  box-shadow: 14px 0 50px rgba(0, 0, 0, .2);
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 14px 20px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(56, 189, 248, .45), rgba(79, 70, 229, .43));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
  font-size: 1.22rem;
  font-weight: 900;
  letter-spacing: -.05em;
}

.brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.brand-copy strong {
  letter-spacing: .09em;
}

.brand-copy span {
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
}

.sidebar-close {
  display: none !important;
  margin-left: auto;
}

.main-nav {
  flex: 1;
  padding: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.nav-label {
  margin: 16px 11px 7px;
  color: var(--soft);
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 47px;
  margin: 3px 0;
  padding: 9px 12px;
  gap: 11px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .07);
}

.nav-item.is-active {
  color: #fff;
  border-color: rgba(125, 211, 252, .2);
  background: linear-gradient(90deg, rgba(59, 130, 246, .28), rgba(56, 189, 248, .09));
}

.nav-item.is-active::before {
  position: absolute;
  content: "";
  left: -13px;
  width: 4px;
  height: 26px;
  border-radius: 0 5px 5px 0;
  background: #60a5fa;
  box-shadow: 0 0 18px rgba(96, 165, 250, .7);
}

.nav-item svg {
  flex: 0 0 auto;
}

.nav-item span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-create {
  margin: 9px 0;
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  background: linear-gradient(135deg, rgba(59, 130, 246, .65), rgba(37, 99, 235, .48));
}

.nav-create:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, .78), rgba(37, 99, 235, .62));
}

.nav-count {
  min-width: 22px !important;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .22);
  font-size: .73rem;
  font-weight: 750;
  text-align: center;
}

.nav-count.danger {
  color: #fecdd3;
  background: var(--danger-bg);
}

.sidebar-footer {
  flex-shrink: 0;
  padding: 12px;
  padding-bottom: calc(12px + var(--safe-bottom));
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-release {
  margin: 8px 9px 0;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.privacy-status {
  display: flex;
  align-items: center;
  margin: 0 4px 11px;
  gap: 9px;
  color: var(--success);
  font-size: .74rem;
}

.privacy-status > div {
  display: grid;
}

.privacy-status span {
  color: var(--soft);
}

.profile-compact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  padding: 9px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--text);
  background: rgba(255, 255, 255, .055);
  cursor: pointer;
  text-align: left;
}

.profile-compact:hover {
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .09);
}

.profile-compact > span:nth-child(2) {
  display: grid;
  min-width: 0;
}

.profile-compact strong,
.profile-compact small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-compact strong {
  font-size: .84rem;
}

.profile-compact small {
  color: var(--soft);
  font-size: .72rem;
}

.avatar,
.top-avatar,
.mini-avatar,
.timeline-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: white;
  font-weight: 800;
}

.avatar {
  width: 38px;
  height: 38px;
  font-size: .78rem;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 7px clamp(16px, 3vw, 38px);
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  background: rgba(8, 17, 31, .68);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  backdrop-filter: blur(22px) saturate(145%);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, .075);
  cursor: pointer;
}

.icon-button:hover {
  color: white;
  background: rgba(255, 255, 255, .13);
}

.mobile-menu {
  display: none;
}

.global-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(600px, 55vw);
}

.global-search > svg {
  position: absolute;
  left: 15px;
  z-index: 1;
  color: var(--soft);
}

.global-search input {
  width: 100%;
  height: 46px;
  padding: 0 72px 0 45px;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  outline: 0;
  color: var(--text);
  background: rgba(255, 255, 255, .075);
}

.global-search input::placeholder {
  color: var(--soft);
}

.global-search input:focus {
  border-color: rgba(96, 165, 250, .65);
  background: rgba(255, 255, 255, .11);
}

.global-search kbd {
  position: absolute;
  right: 11px;
  padding: 3px 7px;
  border: 1px solid var(--stroke);
  border-radius: 7px;
  color: var(--soft);
  background: rgba(0, 0, 0, .16);
  font-family: inherit;
  font-size: .68rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 8px;
}

.availability-button {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 11px;
  gap: 7px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, .075);
  cursor: pointer;
  font-size: .78rem;
  font-weight: 740;
}

.availability-button:hover {
  color: var(--text);
  border-color: rgba(96, 165, 250, .38);
  background: rgba(255, 255, 255, .12);
}

.availability-count {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(34, 197, 94, .23);
  font-size: .68rem;
}

.demo-chip {
  padding: 4px 8px;
  border: 1px solid rgba(251, 191, 36, .25);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(251, 191, 36, .12);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.notification-button {
  position: relative;
}

.notification-button span {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 7px;
  height: 7px;
  border: 2px solid #15233b;
  border-radius: 50%;
  background: var(--danger);
}

.top-avatar {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  cursor: pointer;
  font-size: .8rem;
}

.main-content {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: clamp(20px, 3vw, 38px);
  padding-bottom: calc(48px + var(--safe-bottom));
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 20px;
}

.page-head p,
.section-head p {
  margin: 0;
  color: var(--muted);
}

.page-actions,
.button-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #93c5fd;
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.primary-button,
.secondary-button,
.danger-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  gap: 8px;
  border-radius: 13px;
  font-weight: 720;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  border: 1px solid rgba(147, 197, 253, .5);
  color: white;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 10px 28px rgba(37, 99, 235, .25);
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.secondary-button {
  border: 1px solid var(--stroke);
  color: var(--text);
  background: rgba(255, 255, 255, .08);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, .14);
}

.secondary-button.compact {
  min-height: 40px;
  padding: 8px 12px;
  font-size: .82rem;
}

.danger-button {
  border: 1px solid rgba(251, 113, 133, .34);
  color: #fecdd3;
  background: var(--danger-bg);
}

.text-button {
  min-height: 36px;
  padding: 6px 8px;
  border: 0;
  color: #93c5fd;
  background: transparent;
}

.primary-button:disabled,
.secondary-button:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.hero-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, .7fr);
  align-items: center;
  min-height: 214px;
  margin-bottom: 22px;
  padding: clamp(23px, 4vw, 40px);
  gap: 30px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-panel::after {
  position: absolute;
  content: "";
  right: -70px;
  bottom: -140px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(96, 165, 250, .25), transparent 67%);
  pointer-events: none;
}

.hero-panel .hero-copy {
  position: relative;
  z-index: 1;
}

.hero-panel p {
  max-width: 62ch;
  margin-bottom: 20px;
  color: var(--muted);
}

.hero-quick {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
}

.quick-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 64px;
  padding: 11px 13px;
  gap: 12px;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, .085);
  cursor: pointer;
  text-align: left;
}

.quick-link:hover {
  border-color: var(--stroke-strong);
  background: rgba(255, 255, 255, .13);
  transform: translateX(2px);
}

.quick-link > span:nth-child(2) {
  display: grid;
}

.quick-link small {
  color: var(--soft);
}

.external-access-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  gap: 11px;
  border: 1px solid rgba(74, 222, 128, .22);
  border-radius: 17px;
  color: #d1fae5;
  background: rgba(16, 185, 129, .09);
}

.external-access-notice > svg {
  color: #86efac;
}

.external-access-notice > span,
.external-access-notice strong,
.external-access-notice small {
  display: block;
}

.external-access-notice small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.4;
}

.icon-bubble,
.category-icon,
.metric-icon,
.empty-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, .17);
  background: linear-gradient(135deg, rgba(59, 130, 246, .35), rgba(14, 165, 233, .16));
}

.icon-bubble {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #bfdbfe;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  gap: 14px;
}

.external-dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  min-height: 132px;
  padding: 18px;
  gap: 8px;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .065));
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.metric-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .8rem;
}

.metric-icon {
  width: 37px;
  height: 37px;
  border-radius: 12px;
}

.metric-card strong {
  font-size: 1.76rem;
  line-height: 1;
}

.metric-card small {
  color: var(--soft);
}

/* Compact navigation belongs to the dashboard only; administration metrics
   keep their larger informational presentation. */
.dashboard-metrics .dashboard-metric {
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 64px;
  padding: 8px 12px;
  gap: 10px;
  border-radius: 16px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}

.dashboard-metrics .dashboard-metric:hover {
  border-color: rgba(96, 165, 250, .6);
  background: var(--surface-hover);
}

.dashboard-metrics .dashboard-metric:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.dashboard-metrics .metric-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
}

.dashboard-metrics .metric-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.dashboard-metrics .metric-label {
  font-size: .8rem;
  font-weight: 650;
  line-height: 1.2;
}

.dashboard-metrics .dashboard-metric small {
  font-size: .68rem;
  line-height: 1.2;
}

.dashboard-metrics .dashboard-metric strong {
  font-size: 1.5rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-ticket-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 12px;
  padding: 10px 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: var(--muted);
  background: var(--info-bg);
}

@media (max-width: 1350px) {
  .dashboard-metrics .dashboard-metric { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .dashboard-metrics .metric-icon { display: none; }
  .dashboard-metrics .dashboard-metric small { display: none; }
}

@media (max-width: 560px) {
  .dashboard-grid.dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-metrics .dashboard-metric { min-height: 60px; padding: 8px 10px; }
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .72fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .065));
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.panel-pad {
  padding: clamp(18px, 2.4vw, 26px);
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 15px;
}

.section-head h2 {
  margin-bottom: 4px;
}

.ticket-list {
  display: grid;
  gap: 9px;
}

.ticket-card {
  border: 1px solid rgba(255, 255, 255, .105);
  border-radius: 17px;
  background: rgba(255, 255, 255, .055);
  overflow: hidden;
}

.ticket-card:hover {
  border-color: rgba(96, 165, 250, .38);
  background: rgba(255, 255, 255, .085);
}

.ticket-card.ticket-assignee-away,
.kanban-card.ticket-assignee-away,
.ticket-table tr.ticket-assignee-away,
.ticket-hero.ticket-assignee-away {
  border-color: rgba(251, 191, 36, .48);
  background-image: linear-gradient(135deg, rgba(251, 191, 36, .095), transparent 58%);
}

.ticket-card-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 15px 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.ticket-card-avatar {
  width: 60px;
  height: 60px;
  margin-top: 2px;
  font-size: .95rem;
}

.ticket-card-content { min-width: 0; flex: 1; }
.ticket-card-content h3, .ticket-card-requester { overflow-wrap: anywhere; }
.ticket-card-content .ticket-meta { margin-top: 8px; }
.ticket-card-requester { color: var(--muted); }

.ticket-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 8px;
}

.ticket-number {
  color: #93c5fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .74rem;
}

.ticket-card h3 {
  margin-bottom: 4px;
  font-size: .97rem;
}

.ticket-card-preview {
  display: -webkit-box;
  margin-bottom: 9px;
  overflow: hidden;
  color: var(--muted);
  font-size: .84rem;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ticket-card-preview[hidden] { display: none; }

@media (max-width: 600px) {
  .ticket-card-main { gap: 10px; padding: 13px 12px; }
  .ticket-card-top { flex-wrap: wrap; }
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--soft);
  font-size: .75rem;
}

.ticket-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.status-pill,
.tag,
.priority-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 25px;
  padding: 3px 9px;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 760;
  white-space: nowrap;
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.tone-info {
  color: #93c5fd;
  border-color: rgba(96, 165, 250, .22);
  background: var(--info-bg);
}

.tone-success {
  color: #86efac;
  border-color: rgba(74, 222, 128, .22);
  background: var(--success-bg);
}

.tone-warning {
  color: #fde68a;
  border-color: rgba(251, 191, 36, .22);
  background: var(--warning-bg);
}

.tone-danger {
  color: #fecdd3;
  border-color: rgba(251, 113, 133, .24);
  background: var(--danger-bg);
}

.tone-neutral {
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, .2);
  background: rgba(148, 163, 184, .13);
}

.tone-vacation {
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, .25);
  background: rgba(168, 85, 247, .14);
}

.presence-chip,
.attention-chip,
.cover-chip,
.vacation-notice {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 750;
  line-height: 1.3;
  white-space: normal;
}

.presence-chip > span:first-child {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.attention-chip {
  color: #fff1f2;
  border-color: rgba(251, 113, 133, .36);
  background: rgba(190, 24, 93, .25);
}

.cover-chip {
  color: #fef3c7;
  border-color: rgba(251, 191, 36, .3);
  background: rgba(180, 83, 9, .22);
}

.vacation-notice {
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, .24);
  background: rgba(126, 34, 206, .16);
}

.presence-stale {
  color: var(--soft);
  font-size: .68rem;
}

.person-availability {
  display: flex;
  flex-wrap: wrap;
  margin: -3px 0 14px;
  gap: 6px;
}

.ticket-needs-attention {
  animation: ticket-attention-pulse 1.65s ease-in-out infinite;
}

@keyframes ticket-attention-pulse {
  0%, 100% { border-color: rgba(251, 113, 133, .35); box-shadow: 0 0 0 0 rgba(251, 113, 133, 0); }
  50% { border-color: rgba(251, 113, 133, .9); box-shadow: 0 0 0 5px rgba(251, 113, 133, .16), 0 0 28px rgba(251, 113, 133, .22); }
}

.ticket-table tr.ticket-needs-attention {
  background: rgba(190, 24, 93, .09);
}

.ticket-table .attention-chip,
.ticket-table .cover-chip,
.kanban-card .attention-chip,
.kanban-card .cover-chip {
  display: flex;
  width: fit-content;
  margin-top: 6px;
}

.tag {
  color: var(--muted);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .06);
}

.tips-list,
.activity-list,
.knowledge-list {
  display: grid;
  gap: 10px;
}

.tip-card,
.activity-row,
.knowledge-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
}

.tip-card {
  cursor: pointer;
}

.tip-card:hover,
.knowledge-row:hover {
  border-color: rgba(96, 165, 250, .32);
  background: rgba(255, 255, 255, .075);
}

.tip-card strong,
.tip-card small,
.knowledge-row strong,
.knowledge-row small {
  display: block;
}

.tip-card small,
.knowledge-row small,
.activity-row small {
  color: var(--soft);
}

.mini-progress {
  height: 5px;
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
}

.mini-progress span {
  display: block;
  width: var(--progress, 50%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #38bdf8);
}

.mini-progress.is-danger span {
  background: linear-gradient(90deg, #f59e0b, #fb7185);
}

/* Ticket creation */
.ticket-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 18px;
}

.ticket-form-panel {
  padding: clamp(18px, 3vw, 30px);
}

.stepper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 28px;
  gap: 10px;
}

.step {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: var(--soft);
  font-size: .78rem;
  font-weight: 720;
}

.step:not(:last-child)::after {
  flex: 1 1 0;
  min-width: 0;
  height: 1px;
  background: var(--stroke);
  content: "";
}

.step span {
  display: grid;
  flex: 0 0 29px;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: rgba(255, 255, 255, .055);
}

.step > strong {
  flex-shrink: 0;
}

.step.is-active {
  color: white;
}

.step.is-active span,
.step.is-complete span {
  border-color: rgba(96, 165, 250, .6);
  background: #2563eb;
}

.step.is-complete {
  color: #93c5fd;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  position: relative;
  display: grid;
  align-content: start;
  min-height: 170px;
  padding: 17px;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 19px;
  color: var(--text);
  background: rgba(255, 255, 255, .055);
  cursor: pointer;
  text-align: left;
}

.category-card:hover {
  border-color: var(--stroke-strong);
  background: rgba(255, 255, 255, .09);
  transform: translateY(-2px);
}

.category-card.is-selected {
  border-color: rgba(96, 165, 250, .72);
  background: linear-gradient(145deg, rgba(59, 130, 246, .22), rgba(255, 255, 255, .075));
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .22);
}

.category-card.is-selected::after {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: white;
  background: #3b82f6;
  content: "✓";
  font-size: .72rem;
  font-weight: 800;
}

.category-icon {
  width: 45px;
  height: 45px;
  border-radius: 15px;
}

.category-icon.violet { color: #ddd6fe; background: rgba(139, 92, 246, .2); }
.category-icon.cyan { color: #a5f3fc; background: rgba(6, 182, 212, .17); }
.category-icon.emerald { color: #a7f3d0; background: rgba(16, 185, 129, .17); }
.category-icon.amber { color: #fde68a; background: rgba(245, 158, 11, .17); }
.category-icon.pink { color: #fbcfe8; background: rgba(236, 72, 153, .16); }

.category-card strong {
  margin-top: 2px;
}

.category-card small {
  color: var(--muted);
  line-height: 1.4;
}

.form-stack {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field > label,
.field > legend {
  padding: 0;
  color: var(--text);
  font-size: .83rem;
  font-weight: 720;
}

.field .required {
  color: #fda4af;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 47px;
  padding: 10px 13px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(5, 10, 20, .34);
}

.field textarea {
  min-height: 108px;
  resize: vertical;
}

.field input,
.field select,
.field textarea {
  min-width: 0;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--soft);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(96, 165, 250, .65);
  box-shadow: var(--focus);
}

.field select option {
  color: #0b1426;
  background: white;
}

.field-help {
  color: var(--soft);
  font-size: .74rem;
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.choice {
  position: relative;
}

.choice input {
  position: absolute;
  opacity: 0;
}

.choice label {
  display: grid;
  min-height: 82px;
  padding: 11px;
  gap: 3px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
}

.choice label small {
  color: var(--soft);
}

.choice input:checked + label {
  border-color: rgba(96, 165, 250, .65);
  background: var(--info-bg);
}

.choice input:focus-visible + label {
  box-shadow: var(--focus);
}

.user-preview {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 13px;
  gap: 11px;
  border: 1px solid rgba(74, 222, 128, .21);
  border-radius: 15px;
  background: rgba(74, 222, 128, .07);
}

.user-preview > div {
  display: grid;
}

.user-preview small {
  color: var(--muted);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

.context-panel {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  padding: 20px;
}

.ticket-create-sidebar {
  position: sticky;
  top: calc(var(--topbar-height) + 20px);
  display: grid;
  min-width: 0;
  gap: 18px;
}

.ticket-create-sidebar > .context-panel {
  position: static;
  min-width: 0;
}

.ticket-create-sidebar .user-preview > div {
  min-width: 0;
  overflow-wrap: anywhere;
}

.recent-own-tickets-list {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  gap: 9px;
  list-style: none;
}

.recent-own-ticket {
  display: grid;
  min-width: 0;
  padding: 12px;
  gap: 7px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  text-decoration: none;
}

.recent-own-ticket:hover {
  border-color: rgba(96, 165, 250, .38);
  background: rgba(255, 255, 255, .085);
}

.recent-own-ticket-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 9px;
  font-size: .73rem;
}

.recent-own-ticket-heading > strong {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.recent-own-ticket-heading .status-pill {
  max-width: 100%;
  white-space: normal;
}

.recent-own-ticket-heading .status-pill::before {
  flex-shrink: 0;
}

.recent-own-ticket-subject {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  font-size: .83rem;
  font-weight: 650;
  line-height: 1.45;
}

.recent-own-ticket-date {
  color: var(--soft);
  font-size: .72rem;
}

.security-list {
  display: grid;
  margin: 16px 0 0;
  padding: 0;
  gap: 11px;
  list-style: none;
}

.security-list li {
  display: flex;
  gap: 9px;
  color: var(--muted);
  font-size: .82rem;
}

.security-list svg {
  flex: 0 0 auto;
  color: var(--success);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.access-card {
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 19px;
  background: rgba(255, 255, 255, .05);
}

.access-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 13px;
}

.access-card .meta-list {
  margin: 14px 0;
}

.inline-reveal {
  display: inline-flex;
  min-height: 28px;
  margin-left: 4px;
  padding: 2px 5px;
  font-size: .68rem;
  vertical-align: middle;
}

.security-hint,
.bootstrap-hint {
  display: flex;
  align-items: flex-start;
  padding: 11px 12px;
  gap: 8px;
  border: 1px solid rgba(96, 165, 250, .2);
  border-radius: 13px;
  color: var(--muted);
  background: var(--info-bg);
  font-size: .76rem;
}

.security-hint svg,
.bootstrap-hint svg {
  flex: 0 0 auto;
  color: #93c5fd;
}

.security-hint > span,
.security-hint > div,
.bootstrap-hint > span,
.bootstrap-hint > div {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
}

.bootstrap-hint p {
  margin: 4px 0 0;
}

.portal-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: 82px;
  padding: 12px;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
  cursor: pointer;
}

.portal-choice input {
  position: absolute;
  opacity: 0;
}

.portal-choice:has(input:checked) {
  border-color: rgba(96, 165, 250, .65);
  background: var(--info-bg);
}

.portal-choice:has(input:focus-visible) {
  box-shadow: var(--focus);
}

.portal-choice > span:last-child {
  display: grid;
}

.portal-choice small {
  color: var(--soft);
}

.portal-field-section {
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
}

.access-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 5px 10px;
  color: var(--text);
  font-size: .79rem;
}

.check-line input {
  grid-row: 1 / span 2;
  margin-top: 2px;
}

.check-line small {
  grid-column: 2;
  color: var(--soft);
}

.secret-entry {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.secret-entry input {
  min-width: 0;
  flex: 1 1 180px;
}

.password-strength {
  display: grid;
  grid-template-columns: minmax(70px, 180px) 1fr;
  align-items: center;
  gap: 8px;
  color: var(--soft);
  font-size: .7rem;
}

.password-strength::before {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
  content: "";
}

.password-strength > span {
  z-index: 1;
  grid-column: 1;
  grid-row: 1;
  width: 0;
  height: 5px;
  border-radius: 999px;
  background: var(--danger);
  transition: width .2s ease;
}

.password-strength > span[data-score="3"],
.password-strength > span[data-score="4"] {
  background: var(--success);
}

.blind-replacement {
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.suggestion-box {
  margin-top: 17px;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, .22);
  border-radius: 16px;
  background: rgba(139, 92, 246, .08);
}

.suggestion-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ddd6fe;
  font-weight: 750;
  font-size: .82rem;
}

.suggestion-box p {
  margin: 8px 0 11px;
  color: var(--muted);
  font-size: .78rem;
}

/* Rich editor and uploads */
.composer {
  border: 1px solid var(--stroke);
  border-radius: 17px;
  background: rgba(5, 10, 20, .25);
  overflow: hidden;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  min-height: 47px;
  padding: 5px 7px;
  gap: 3px;
  border-bottom: 1px solid rgba(255, 255, 255, .11);
  overflow-x: auto;
}

.editor-toolbar button,
.editor-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 35px;
  min-height: 35px;
  padding: 5px 8px;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.editor-toolbar button:hover,
.editor-file-button:hover,
.editor-toolbar button.is-active {
  color: white;
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .09);
}

.editor-file-button input,
.file-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.toolbar-divider {
  flex: 0 0 auto;
  width: 1px;
  height: 23px;
  margin: 0 3px;
  background: var(--stroke);
}

.editor-dropzone {
  position: relative;
}

.composer [data-file-status][data-error="true"] {
  color: var(--danger);
  font-weight: 600;
}

.rich-editor {
  min-height: 180px;
  max-height: 460px;
  padding: 15px;
  outline: none;
  overflow-y: auto;
  color: var(--text);
  line-height: 1.58;
}

.rich-editor:empty::before {
  color: var(--soft);
  content: attr(data-placeholder);
  pointer-events: none;
}

.rich-editor blockquote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid #60a5fa;
  color: var(--muted);
}

.rich-editor figure {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 10px 6px 10px 0;
  padding: 7px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
}

.rich-editor figure img {
  display: block;
  max-width: min(100%, 420px);
  max-height: 320px;
  border-radius: 8px;
  object-fit: contain;
}

.rich-editor figure figcaption {
  margin-top: 5px;
  color: var(--soft);
  font-size: .75rem;
}

.drop-overlay {
  position: absolute;
  inset: 6px;
  z-index: 3;
  display: none;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 2px dashed #60a5fa;
  border-radius: 14px;
  color: #bfdbfe;
  background: rgba(15, 30, 55, .92);
  pointer-events: none;
}

.editor-dropzone.is-dragging .drop-overlay {
  display: grid;
}

.attachment-list {
  display: grid;
  padding: 0 10px;
  gap: 7px;
}

.attachment-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  padding: 8px;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  background: rgba(255, 255, 255, .045);
}

.attachment-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  object-fit: cover;
}

.attachment-info {
  min-width: 0;
}

.attachment-info strong,
.attachment-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-info strong {
  font-size: .79rem;
}

.attachment-info small {
  color: var(--soft);
  font-size: .7rem;
}

.upload-progress {
  width: min(180px, 100%);
  height: 4px;
  margin-top: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
}

.upload-progress span {
  display: block;
  width: var(--upload-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #60a5fa;
  transition: width .18s ease;
}

.attachment-actions {
  display: flex;
  gap: 4px;
}

.attachment-actions button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

.attachment-actions button:hover {
  color: white;
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .07);
}

.attachment-item.is-error {
  border-color: rgba(251, 113, 133, .3);
}

.attachment-item.is-error .upload-progress span {
  background: var(--danger);
}

/* Saved attachments use their own actions, independent of composer icon buttons. */
.message-attachments {
  display: grid;
  gap: 9px;
  margin-top: 12px;
  min-width: 0;
}

.existing-attachment {
  min-width: 0;
  padding: 11px;
  grid-template-columns: 40px minmax(0, 1fr) auto;
}

.existing-attachment .attachment-thumb {
  width: 40px;
  height: 44px;
}

.existing-attachment .attachment-info strong {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: .82rem;
}

.existing-attachment .status-pill {
  max-width: 100%;
  margin-top: 5px;
  white-space: normal;
  line-height: 1.4;
  text-align: left;
}

.existing-attachment .tone-neutral {
  color: var(--muted);
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .045);
}

.existing-attachment-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
}

.attachment-preview-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  padding: 9px;
  border: 1px solid rgba(96, 165, 250, .45);
  border-radius: 11px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .14);
  cursor: pointer;
  touch-action: manipulation;
}

.attachment-preview-button:hover {
  color: white;
  background: rgba(59, 130, 246, .3);
}

.attachment-preview-button:focus-visible {
  outline: 3px solid var(--accent, #60a5fa);
  outline-offset: 3px;
}

.attachment-preview-button svg {
  width: 23px;
  height: 23px;
}

.attachment-unavailable {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  max-width: 116px;
  padding: 6px 9px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  color: var(--soft);
  font-size: .72rem;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .existing-attachment { gap: 8px; padding: 9px; grid-template-columns: minmax(0, 1fr) auto; }
  .existing-attachment > .attachment-thumb { display: none; }
  .attachment-unavailable { max-width: 88px; }
  .message-attachments { margin-inline: -3px; }
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  padding: 9px 12px;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--soft);
  font-size: .69rem;
}

.composer > [data-sensitive-warning] {
  margin: 8px 10px;
}

.privacy-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.privacy-inline svg {
  width: 14px;
  height: 14px;
  color: var(--success);
}

/* ticket detail */
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 18px;
}

.detail-main,
.detail-sidebar {
  display: grid;
  gap: 15px;
}

.ticket-hero {
  padding: clamp(18px, 2.8vw, 28px);
}

.detail-back {
  margin: -5px 0 13px -7px;
}

.ticket-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ticket-title-row h1 {
  font-size: clamp(1.38rem, 2.7vw, 2rem);
}

.ticket-facts {
  display: flex;
  flex-wrap: wrap;
  margin-top: 16px;
  gap: 9px;
}

.ticket-facts .tag {
  min-height: 30px;
}

.live-closed-notice {
  margin: 15px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(74, 222, 128, .26);
  border-radius: 12px;
  color: #bbf7d0;
  background: rgba(22, 163, 74, .12);
  font-size: .78rem;
}

.sla-card {
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: rgba(255, 255, 255, .045);
}

.sla-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: .78rem;
}

.timeline {
  display: grid;
  padding: clamp(17px, 2.5vw, 25px);
  gap: 18px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
}

.timeline-item:not(:last-child)::before {
  position: absolute;
  top: 66px;
  bottom: -19px;
  left: 29px;
  width: 1px;
  background: rgba(255, 255, 255, .13);
  content: "";
}

.timeline-avatar {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  font-size: .95rem;
}

.timeline-item.internal .timeline-avatar {
  border: 2px solid rgba(251, 146, 60, .5);
}

.timeline-content {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 4px 16px 16px;
  background: rgba(255, 255, 255, .045);
}

.timeline-item.internal .timeline-content {
  border-color: rgba(251, 146, 60, .28);
  background: rgba(251, 146, 60, .085);
}

.internal-note-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border: 1px solid rgba(251, 146, 60, .3);
  border-radius: 6px;
  color: #fdba74;
  background: rgba(249, 115, 22, .13);
  font-size: .72rem;
  font-weight: 750;
}

.internal-note-label svg {
  width: 13px;
  height: 13px;
}

.reply-panel.is-internal-note {
  border-color: rgba(251, 146, 60, .3);
  background: rgba(251, 146, 60, .055);
}

.reply-tabs button[data-reply-mode="internal"].is-active {
  color: #fdba74;
  background: rgba(249, 115, 22, .13);
}

.ticket-assignment-card {
  border-color: rgba(96, 165, 250, .28);
}

.ticket-assignment-controls {
  min-width: 0;
  gap: 13px;
}

.assignment-takeover {
  color: #431407;
  border-color: #fb923c;
  background: linear-gradient(135deg, #fdba74, #fb923c);
  box-shadow: 0 8px 24px rgba(249, 115, 22, .18);
}
.assignment-takeover:focus-visible { outline: 3px solid #fb923c; outline-offset: 3px; }
.assignment-takeover:disabled { filter: none; box-shadow: none; }
.assignment-takeover-hint { margin: -4px 0 0; line-height: 1.5; }
.assignment-takeover[hidden], .assignment-takeover-hint[hidden] { display: none !important; }

.assignment-field { min-width: 0; }
.ticket-observers-controls { min-width: 0; }
[data-ticket-assignment] + [data-ticket-observers] { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--stroke); }
.observer-select { min-width: 0; padding: 9px; border: 1px solid var(--stroke-strong); border-radius: 14px; background: rgba(96, 165, 250, .055); }
.observer-select:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(96, 165, 250, .12); }
.observer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.observer-chip { display: inline-flex; align-items: center; gap: 3px; max-width: 100%; min-height: 31px; padding: 3px 4px 3px 9px; border: 1px solid rgba(96, 165, 250, .3); border-radius: 9px; color: var(--text); background: rgba(96, 165, 250, .14); }
.observer-chip > span { min-width: 0; font-size: .73rem; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.observer-chip button { flex: 0 0 26px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); background: transparent; font-size: 1.2rem; cursor: pointer; }
.observer-chip button:hover:not(:disabled) { color: var(--text); background: rgba(96, 165, 250, .18); }
.observer-chip button:disabled { cursor: default; opacity: .5; }
.observer-chip.is-unavailable { border-color: #d97706; color: #fdba74; }
.observer-select input { display: block; width: 100%; min-width: 0; min-height: 40px; margin: 3px 0 0; padding: 9px 3px; border: 0; border-radius: 0; color: var(--text); background: transparent; outline: none; font: inherit; font-size: .8rem; }
.observer-select input::placeholder { color: var(--muted); }
.observer-select input:disabled { opacity: .6; }
.observer-list-panel { margin: 4px -2px 0; border-top: 1px solid var(--stroke); }
.observer-results { max-height: 310px; padding-top: 5px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--stroke-strong) transparent; }
.observer-option { display: flex; align-items: center; gap: 10px; min-height: 60px; margin: 2px 0; padding: 9px 7px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; touch-action: pan-y; }
.observer-option:hover, .observer-option.is-highlighted { border-color: rgba(96, 165, 250, .35); background: rgba(96, 165, 250, .14); }
.observer-check { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; border: 1px solid var(--stroke-strong); border-radius: 5px; color: #fff; font-size: .85rem; font-weight: 750; }
.observer-option[aria-selected="true"] .observer-check { border-color: #3b82f6; background: #2563eb; }
.observer-result-status { margin: 4px 3px 0; padding: 8px 0 2px; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.observer-status { margin: 9px 0 0; line-height: 1.55; font-size: .7rem; }
.observer-status[role="alert"], .observer-result-status[role="alert"] { color: #fda4af; }
.observer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.observer-actions > span { flex: 1 0 100%; margin: 0; }
.observer-actions button { flex: 1; min-height: 39px; padding: 8px; font-size: .73rem; }
.observer-reload { margin: 8px 0 0; font-size: .72rem; text-align: left; }
.observer-empty-selection { margin: 3px; font-size: .75rem; }
.observer-select.is-read-only { padding: 10px; }
.observer-select.is-read-only .observer-chip { padding-right: 9px; }
.observer-chip button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.observer-list-panel[hidden], .observer-actions[hidden], .observer-empty-selection[hidden], .observer-reload[hidden] { display: none !important; }
.observer-read-only-notice { padding: 16px 20px; color: var(--muted); font-size: .82rem; line-height: 1.6; }
html[data-theme="light"] .observer-select { background: #f8fafc; border-color: #cbd5e1; }
html[data-theme="light"] .observer-chip { color: #1e3a5f; background: #eff6ff; border-color: #bfdbfe; }
html[data-theme="light"] .observer-chip.is-unavailable { color: #92400e; border-color: #d97706; }
html[data-theme="light"] .observer-status[role="alert"], html[data-theme="light"] .observer-result-status[role="alert"] { color: #be123c; }
@media (pointer: coarse) {
  .observer-select input { min-height: 44px; font-size: 16px; }
  .observer-chip button { width: 32px; height: 32px; flex-basis: 32px; }
}
@media (forced-colors: active) {
  .observer-select, .observer-chip, .observer-check { border-color: CanvasText; }
  .observer-option.is-highlighted { outline: 1px solid Highlight; }
  .observer-option[aria-selected="true"] .observer-check { color: HighlightText; background: Highlight; }
}
.assignment-field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 650;
}

.assignment-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 66px;
  padding: 11px;
  border: 1px solid var(--stroke-strong);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(96, 165, 250, .09), rgba(255, 255, 255, .035));
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.assignment-trigger:hover:not(:disabled),
.assignment-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  background: rgba(96, 165, 250, .14);
}

.assignment-trigger:focus-visible,
.assignment-popup-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.assignment-trigger:disabled { cursor: default; opacity: .65; }
.assignment-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  font-size: .73rem;
  font-weight: 750;
}

.assignment-avatar-empty {
  color: var(--muted);
  background: rgba(148, 163, 184, .13);
  border-color: var(--stroke);
}

.assignment-avatar svg { width: 18px; height: 18px; }
.assignment-person-copy { display: grid; flex: 1; min-width: 0; gap: 3px; }
.assignment-person-copy strong {
  display: block;
  color: var(--text);
  font-size: .8rem;
  line-height: 1.35;
  font-weight: 680;
  overflow-wrap: anywhere;
}

.assignment-person-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: .67rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-self-marker { font-weight: 450; color: var(--muted); }
.assignment-chevron { display: flex; flex: 0 0 16px; color: var(--muted); }
.assignment-chevron svg { width: 16px; height: 16px; transition: transform .16s ease; }
.assignment-trigger[aria-expanded="true"] .assignment-chevron svg { transform: rotate(180deg); }
.assignment-status { margin: 0; line-height: 1.5; }
.assignment-status[role="alert"] { color: #fda4af; }
.assignment-reload { justify-self: start; text-align: left; font-size: .72rem; }

/* The picker is a body portal, outside every sidebar clipping/stacking context. */
.assignment-popup {
  position: fixed;
  z-index: 320;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(148, 183, 230, .3);
  border-radius: 17px;
  color: var(--text);
  background: #162338;
  box-shadow: 0 22px 65px rgba(0, 0, 0, .45), 0 3px 12px rgba(0, 0, 0, .22);
}

.assignment-popup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 8px;
  padding: 0 0 8px 3px;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 700;
}

.assignment-popup-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
}

.assignment-popup-close:hover { background: var(--surface-hover); color: var(--text); }
.assignment-search {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 9px;
  min-width: 0;
  padding: 0 11px;
  border: 1px solid var(--stroke-strong);
  border-radius: 11px;
  background: rgba(0, 0, 0, .17);
}

.assignment-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(96, 165, 250, .16); }
.assignment-search > svg { flex: 0 0 17px; width: 17px; height: 17px; color: var(--muted); }
.assignment-search input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  outline: none;
  color: var(--text);
  background: transparent;
  font-size: .81rem;
}

.assignment-search input::placeholder { color: var(--soft); }
.assignment-result-scroll {
  min-height: 0;
  margin-top: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--stroke-strong) transparent;
  scroll-padding: 4px;
}

.assignment-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 60px;
  margin: 2px 0;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  cursor: pointer;
  touch-action: pan-y;
}

.assignment-option:hover,
.assignment-option.is-highlighted { background: rgba(96, 165, 250, .14); border-color: rgba(96, 165, 250, .3); }
.assignment-option[aria-selected="true"] .assignment-person-copy strong { color: #bfdbfe; }
.assignment-option-check { display: flex; flex: 0 0 17px; color: #93c5fd; }
.assignment-option-check svg { width: 17px; height: 17px; stroke-width: 2.6; }
.assignment-empty { padding: 18px 10px; margin: 0; text-align: center; font-size: .8rem; }
.assignment-empty[hidden] { display: none !important; }
.assignment-empty span { display: inline-block; margin-top: 5px; color: var(--muted); font-size: .73rem; }
.assignment-popup-count { flex-shrink: 0; margin: 7px 3px 0; padding-top: 8px; border-top: 1px solid var(--stroke); color: var(--soft); font-size: .67rem; }

html[data-theme="light"] .assignment-trigger { background: rgba(255, 255, 255, .8); border-color: #cbd5e1; }
html[data-theme="light"] .assignment-popup { background: #fff; border-color: #cbd5e1; color: #0f172a; box-shadow: 0 22px 65px rgba(15, 23, 42, .22); }
html[data-theme="light"] .assignment-popup .assignment-person-copy strong,
html[data-theme="light"] .assignment-trigger .assignment-person-copy strong { color: #0f172a; }
html[data-theme="light"] .assignment-popup .assignment-person-copy small,
html[data-theme="light"] .assignment-trigger .assignment-person-copy small,
html[data-theme="light"] .assignment-self-marker,
html[data-theme="light"] .assignment-chevron,
html[data-theme="light"] .assignment-avatar-empty,
html[data-theme="light"] .assignment-search > svg,
html[data-theme="light"] .assignment-popup-head,
html[data-theme="light"] .assignment-popup-close,
html[data-theme="light"] .assignment-popup-count,
html[data-theme="light"] .assignment-empty span { color: #526078; }
html[data-theme="light"] .assignment-search { background: #f8fafc; border-color: #cbd5e1; }
html[data-theme="light"] .assignment-search input { color: #0f172a; }
html[data-theme="light"] .assignment-search input::placeholder { color: #64748b; }
html[data-theme="light"] .assignment-option-check,
html[data-theme="light"] .assignment-option[aria-selected="true"] .assignment-person-copy strong { color: #1d4ed8; }
html[data-theme="light"] .assignment-status[role="alert"] { color: #be123c; }

@media (pointer: coarse) {
  .assignment-search input { font-size: 16px; }
  .assignment-popup-close { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .assignment-trigger, .assignment-chevron svg { transition: none; }
}

@media (forced-colors: active) {
  .assignment-trigger, .assignment-popup, .assignment-search { border: 1px solid CanvasText; }
  .assignment-option.is-highlighted { border-color: Highlight; outline: 1px solid Highlight; }
  .assignment-option[aria-selected="true"] .assignment-person-copy strong,
  .assignment-option-check { color: LinkText; }
}

[data-ticket-actions] [hidden],
[data-live-ticket-escalation][hidden] {
  display: none !important;
}

html[data-theme="light"] .internal-note-label,
html[data-theme="light"] .reply-tabs button[data-reply-mode="internal"].is-active {
  color: #a84608;
}

.timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
  gap: 6px;
}

.timeline-head strong {
  font-size: .83rem;
}

.timeline-head time {
  color: var(--soft);
  font-size: .7rem;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
  white-space: pre-wrap;
}

.message-document > h3 {
  margin-top: 16px;
  font-size: 1.25rem;
  line-height: 1.4;
}

.message-document > h3:first-child {
  margin-top: 0;
}

.message-document > h3 a {
  text-decoration: underline;
  text-underline-offset: .18em;
}

.message-document > :last-child {
  margin-bottom: 0;
}

.message-document blockquote {
  margin: 8px 0;
  padding-left: 12px;
  border-left: 3px solid #60a5fa;
  color: var(--muted);
}

.message-document pre {
  max-width: 100%;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .25);
  overflow-x: auto;
}

.message-image {
  max-width: min(100%, 620px);
  margin: 12px 0;
  padding: 7px;
  border: 1px solid var(--stroke);
  border-radius: 13px;
  background: rgba(255, 255, 255, .04);
}

.message-image img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 540px;
  border-radius: 9px;
  object-fit: contain;
}

.message-image figcaption {
  padding: 6px 3px 1px;
  color: var(--soft);
  font-size: .72rem;
}

.message-image-preview {
  display: block;
  max-width: 100%;
  margin: 0 auto 8px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
}
.message-image-preview:focus-visible { outline: 3px solid #8bc4ff; outline-offset: 2px; }
.message-image .existing-attachment { margin: 0; }

.reply-panel {
  padding: clamp(16px, 2.5vw, 24px);
}

.reply-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  margin-bottom: 13px;
  padding: 3px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, .13);
}

.reply-tabs button {
  min-height: 35px;
  padding: 6px 12px;
  border: 0;
  border-radius: 9px;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

.reply-tabs button.is-active {
  color: white;
  background: rgba(59, 130, 246, .4);
}

.reply-tabs button[data-mode="internal"].is-active {
  color: #ede9fe;
  background: rgba(139, 92, 246, .35);
}

.reply-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.reply-submit-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.reply-complete-button {
  background: linear-gradient(135deg, #15803d, #166534);
  border-color: #4ade80;
  box-shadow: 0 6px 20px rgba(22, 101, 52, .22);
}

.reply-complete-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #16a34a, #15803d);
}

.reply-completion-pending {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(251, 191, 36, .45);
  border-radius: 12px;
  background: rgba(120, 80, 20, .12);
}

.reply-completion-pending p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .85rem;
}

.confidential-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .78rem;
  cursor: pointer;
}

.confidential-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
}

.meta-card {
  padding: 18px;
}

.meta-card h3 {
  margin-bottom: 13px;
}

.ticket-activity-card { min-width: 0; }
.ticket-activity-card h3 { margin-bottom: 5px; }
.ticket-activity-caption { margin: 0 0 12px; }
.ticket-activity-list {
  display: grid;
  gap: 0;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0;
  padding: 0 3px 0 0;
  list-style: none;
  scrollbar-width: thin;
}
.ticket-activity-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--stroke);
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.ticket-activity-list li:first-child { padding-top: 0; }
.ticket-activity-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.ticket-activity-list li > span { color: var(--text); }
.ticket-activity-list time { font-size: .74rem; white-space: nowrap; }
.ticket-activity-status { margin: 10px 0 0; }
.ticket-activity-more { margin: 10px 0 0; white-space: normal; text-align: left; }

.meta-list {
  display: grid;
  margin: 0;
  gap: 12px;
}

.meta-list > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 9px;
}

.meta-list dt {
  color: var(--soft);
  font-size: .74rem;
}

.meta-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .78rem;
}

.ai-card {
  padding: 18px;
  border-color: rgba(167, 139, 250, .25);
  background: linear-gradient(145deg, rgba(139, 92, 246, .13), rgba(255, 255, 255, .055));
}

.ai-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ddd6fe;
}

.ai-card p {
  color: var(--muted);
  font-size: .78rem;
}

/* list/workbench */
.filter-bar {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px;
  gap: 8px;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  background: rgba(255, 255, 255, .06);
  overflow-x: auto;
}

.filter-search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.filter-search svg {
  position: absolute;
  top: 11px;
  left: 11px;
  color: var(--soft);
}

.filter-search input,
.filter-bar select {
  height: 42px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  color: var(--text);
  background: rgba(5, 10, 20, .34);
}

.filter-search input {
  width: 100%;
  padding: 8px 10px 8px 39px;
}

.filter-bar select {
  min-width: 140px;
  padding: 7px 30px 7px 10px;
}

.filter-bar select option {
  color: #0b1426;
}

.segmented {
  display: flex;
  padding: 3px;
  border: 1px solid var(--stroke);
  border-radius: 11px;
  background: rgba(0, 0, 0, .13);
}

.segmented button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

.segmented button.is-active {
  color: white;
  background: rgba(59, 130, 246, .38);
}

.scope-switch {
  flex: 0 0 auto;
}

.scope-switch button {
  width: auto;
  min-width: 62px;
  padding: 0 11px;
  font-size: .74rem;
  font-weight: 760;
}

.ticket-table-wrap {
  border: 1px solid var(--stroke);
  border-radius: 20px;
  background: rgba(255, 255, 255, .055);
  overflow: hidden;
}

.ticket-table {
  width: 100%;
  border-collapse: collapse;
}

.ticket-table th,
.ticket-table td {
  padding: 12px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, .075);
  text-align: left;
  vertical-align: middle;
}

.ticket-table th {
  color: var(--soft);
  background: rgba(255, 255, 255, .04);
  font-size: .7rem;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.ticket-table td {
  color: var(--muted);
  font-size: .8rem;
}

.ticket-table tbody tr {
  cursor: pointer;
}

.ticket-table tbody tr:hover {
  background: rgba(255, 255, 255, .055);
}

.table-title {
  display: grid;
}

.table-title strong {
  color: var(--text);
  font-size: .82rem;
}

.table-title small {
  color: var(--soft);
}

.bulk-bar {
  position: sticky;
  bottom: 18px;
  z-index: 5;
  display: none;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin: 14px auto 0;
  padding: 9px 11px;
  gap: 9px;
  border-radius: 15px;
}

.bulk-bar.is-visible {
  display: flex;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(260px, 1fr));
  padding-bottom: 12px;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
}

.kanban-column {
  padding: 11px;
  border: 1px solid var(--stroke);
  border-radius: 19px;
  background: rgba(255, 255, 255, .045);
  scroll-snap-align: start;
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 2px 3px;
  color: var(--muted);
  font-size: .79rem;
  font-weight: 750;
}

.kanban-head span {
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}

.kanban-items {
  display: grid;
  min-height: 100px;
  gap: 8px;
}

.kanban-card {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px;
  background: rgba(12, 24, 43, .72);
  cursor: grab;
}

.kanban-card:hover {
  border-color: rgba(96, 165, 250, .34);
}

.kanban-card h3 {
  margin: 7px 0;
  font-size: .84rem;
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--soft);
  font-size: .68rem;
}

/* knowledge, assets, reports and admin */
.knowledge-hero {
  padding: clamp(22px, 4vw, 38px);
  text-align: center;
}

.knowledge-search {
  position: relative;
  width: min(650px, 100%);
  margin: 18px auto 0;
}

.knowledge-search svg {
  position: absolute;
  top: 15px;
  left: 16px;
  color: var(--soft);
}

.knowledge-search input {
  width: 100%;
  height: 52px;
  padding: 10px 14px 10px 48px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  outline: none;
  color: var(--text);
  background: rgba(5, 10, 20, .4);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.article-card {
  display: grid;
  grid-template-columns: auto 1fr;
  padding: 16px;
  gap: 12px;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  text-align: left;
}

.article-card:hover {
  border-color: rgba(96, 165, 250, .38);
  background: rgba(255, 255, 255, .085);
}

.article-card p {
  margin: 5px 0 0;
  color: var(--soft);
  font-size: .74rem;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.asset-card {
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 19px;
  background: rgba(255, 255, 255, .055);
}

.asset-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 15px;
}

.asset-card h3 {
  margin-bottom: 3px;
}

.asset-card p {
  color: var(--muted);
  font-size: .79rem;
}

.asset-card-footer {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: var(--soft);
  font-size: .72rem;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  gap: 12px;
}

.report-card {
  padding: 18px;
}

.report-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 1.8rem;
}

.report-card small {
  color: var(--soft);
}

.chart-panel {
  padding: 20px;
}

.bar-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  height: 250px;
  padding: 20px 10px 0;
  gap: 8px;
  border-bottom: 1px solid var(--stroke);
}

.bar-chart div {
  position: relative;
  min-height: 8px;
  height: var(--height);
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.bar-chart div:hover::after {
  position: absolute;
  top: -28px;
  left: 50%;
  padding: 3px 6px;
  border-radius: 6px;
  color: #fff;
  background: #0b1426;
  content: attr(data-value);
  font-size: .7rem;
  transform: translateX(-50%);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.admin-card {
  display: grid;
  min-height: 180px;
  padding: 18px;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 19px;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
}

.admin-card:hover {
  border-color: rgba(96, 165, 250, .37);
  background: rgba(255, 255, 255, .08);
}

.admin-card p {
  color: var(--muted);
  font-size: .79rem;
}

.external-access-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  gap: 13px;
}

.external-access-layout {
  display: grid;
  grid-template-columns: minmax(310px, .7fr) minmax(0, 1.3fr);
  align-items: start;
  gap: 16px;
}

.external-domain-panel,
.external-user-panel {
  min-width: 0;
}

.external-domain-list,
.external-user-list {
  display: grid;
  gap: 9px;
}

.external-domain-list {
  margin-top: 20px;
}

.external-access-row,
.external-user-row {
  display: grid;
  align-items: center;
  padding: 12px;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .04);
}

.external-access-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.external-user-row {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.external-access-identity {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.external-access-identity strong,
.external-access-identity span,
.external-access-identity small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.external-access-identity span {
  color: var(--muted);
  font-size: .82rem;
}

.external-access-identity small {
  color: var(--soft);
  font-size: .72rem;
  line-height: 1.4;
}

.external-user-avatar {
  width: 36px;
  height: 36px;
}

.external-user-toolbar {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 9px;
}

.external-user-toolbar .filter-search {
  min-width: 0;
}

.compact-filter {
  flex: 0 1 210px;
  min-width: 160px;
}

.compact-filter select {
  min-height: 42px;
}

.external-user-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 24px;
  gap: 6px;
  border: 1px dashed var(--stroke);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.external-user-empty > svg {
  width: 30px;
  height: 30px;
  margin-bottom: 4px;
  color: #93c5fd;
}

.external-user-empty span {
  color: var(--soft);
  font-size: .78rem;
}

.danger-button.compact {
  min-height: 40px;
  padding: 8px 12px;
  font-size: .82rem;
}

.auth-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
  align-items: start;
  gap: 16px;
}

.auth-setup-photo-column {
  display: grid;
  align-content: start;
  gap: 16px;
  min-width: 0;
}

.auth-setup-card {
  align-content: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  gap: 18px;
}

.auth-setup-grid > *,
.auth-setup-card .section-head,
.auth-setup-card .section-head > div:first-child,
.auth-setup-card .access-form-grid > * {
  min-width: 0;
}

.auth-setup-card .access-form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.auth-setup-card p,
.auth-setup-card small {
  overflow-wrap: break-word;
}

.admin-auth-view {
  min-width: 0;
  container-type: inline-size;
}

@container (max-width: 1255px) {
  .auth-setup-photos-grid .auth-setup-photo-column { display: contents; }
  .auth-setup-photos-grid .auth-setup-step-1 { order: 1; }
  .auth-setup-photos-grid .auth-setup-step-2 { order: 2; }
  .auth-setup-photos-grid .auth-setup-step-3 { order: 3; }
  .auth-setup-photos-grid [data-employee-photos-admin] { order: 4; }
  .auth-setup-photos-grid .auth-setup-step-4 { order: 5; }
}

.employee-photo-automation { border-top: 1px solid var(--line); padding-top: 16px; }
.employee-photo-automation ol { padding-left: 1.4rem; }
.employee-photo-automation li { margin-bottom: .7rem; }
.employee-photo-automation > a { display: block; margin-top: 12px; }
.employee-photo-automation > a[hidden] { display: none; }

.auth-setup-card .section-head > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 10px;
}

.auth-setup-card .section-head h2,
.auth-setup-card .section-head p {
  grid-column: 2;
}

.auth-step {
  grid-row: 1 / span 2;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(96, 165, 250, .42);
  border-radius: 13px;
  color: #dbeafe;
  background: rgba(37, 99, 235, .2);
  font-weight: 800;
}

.auth-state-line,
.auth-invitation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-invitation-list {
  display: grid;
  gap: 9px;
}

.auth-invitation {
  padding: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, .035);
}

.auth-invitation > div {
  display: grid;
  min-width: 180px;
  margin-right: auto;
  gap: 3px;
}

.auth-invitation small,
.muted-copy,
.field small {
  color: var(--muted);
  line-height: 1.45;
}

.auth-success {
  margin-bottom: 16px;
  border-color: rgba(52, 211, 153, .34);
  color: #bbf7d0;
  background: rgba(16, 185, 129, .1);
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(100%, 760px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 48px);
}

.auth-shell > .panel {
  width: 100%;
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #86efac;
  font-size: .74rem;
}

.system-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  content: "";
}

.incident-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  padding: 16px;
  gap: 14px;
  border: 1px solid var(--stroke);
  border-radius: 17px;
  background: rgba(255, 255, 255, .05);
}

.incident-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: #fde68a;
  background: var(--warning-bg);
}

.incident-card p {
  margin: 5px 0 0;
  color: var(--soft);
  font-size: .76rem;
}

.profile-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  padding: 26px;
  gap: 20px;
}

.profile-large {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 27px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 1.65rem;
  font-weight: 850;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 11px;
}

.profile-completion-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-bottom: 16px;
  padding: 14px 16px;
  gap: 12px;
  border: 1px solid rgba(251, 191, 36, .3);
  border-radius: 17px;
  color: #fef3c7;
  background: rgba(245, 158, 11, .1);
}

.profile-completion-notice > svg {
  color: #fde68a;
}

.profile-completion-notice > span,
.profile-completion-notice strong,
.profile-completion-notice small {
  display: block;
}

.profile-completion-notice small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.external-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.external-profile-company {
  grid-column: 1 / -1;
}

.readonly-field input[readonly] {
  color: var(--muted);
  border-style: dashed;
  background: rgba(255, 255, 255, .035);
  cursor: not-allowed;
}

.optional,
.contact-required {
  margin-left: 4px;
  color: var(--soft);
  font-size: .68rem;
  font-weight: 600;
}

.contact-required {
  color: #fde68a;
}

.external-profile-actions {
  justify-content: flex-end;
}

.contact-row {
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
}

.contact-row small,
.contact-row strong {
  display: block;
}

.contact-row small {
  color: var(--soft);
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 55px 18px;
  text-align: center;
}

.empty-icon {
  width: 58px;
  height: 58px;
  margin-bottom: 13px;
  border-radius: 19px;
  color: #bfdbfe;
}

.empty-icon.warning {
  color: #fde68a;
  background: var(--warning-bg);
}

.empty-state p {
  max-width: 48ch;
  color: var(--muted);
}

.login-selection {
  width: min(780px, 100%);
  min-height: 440px;
  margin: clamp(18px, 7vh, 72px) auto 0;
}

.login-selection > p {
  max-width: 62ch;
}

.login-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(690px, 100%);
  margin: 18px 0 14px;
  gap: 12px;
}

.login-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 92px;
  padding: 15px;
  gap: 12px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  cursor: pointer;
  text-align: left;
}

.login-choice:hover,
.login-choice:focus-visible {
  border-color: rgba(96, 165, 250, .55);
  background: rgba(59, 130, 246, .13);
  transform: translateY(-2px);
}

.login-choice > span:nth-child(2),
.login-choice strong,
.login-choice small {
  display: block;
}

.login-choice small {
  margin-top: 4px;
  color: var(--soft);
  line-height: 1.35;
}

.login-choice-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(96, 165, 250, .28);
  border-radius: 14px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, .18);
}

.login-security-note {
  display: inline-flex;
  align-items: center;
  max-width: 620px;
  gap: 6px;
  color: var(--soft);
  line-height: 1.45;
}

.login-security-note svg {
  flex: 0 0 auto;
  color: #86efac;
}

/* Dialogs, camera and image editor */
dialog {
  padding: 0;
  border: 0;
  color: var(--text);
  background: transparent;
}

dialog::backdrop {
  background: rgba(2, 6, 14, .78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

body.has-dialog {
  overflow: hidden;
}

.media-dialog {
  width: min(720px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
}

.dialog-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 24px);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 13px 16px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.dialog-header h2 {
  margin: 0;
}

.camera-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 340px;
  background: #02040a;
  overflow: hidden;
}

.camera-stage video {
  display: block;
  width: 100%;
  height: min(64vh, 540px);
  object-fit: cover;
}

.camera-stage video.is-mirrored {
  transform: scaleX(-1);
}

.camera-guide {
  position: absolute;
  inset: 12% 9%;
  border: 2px solid rgba(255, 255, 255, .72);
  border-radius: 22px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .12);
  pointer-events: none;
}

.camera-stage p {
  position: absolute;
  bottom: 14px;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 30px);
  margin: 0;
  padding: 7px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .88);
  background: rgba(0, 0, 0, .52);
  font-size: .74rem;
  text-align: center;
  transform: translateX(-50%);
}

.camera-permission {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  padding: 24px;
  text-align: center;
}

.camera-permission p {
  color: var(--muted);
}

.camera-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 86px;
  padding: 10px 16px;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

.camera-controls > :last-child {
  justify-self: end;
}

.shutter {
  display: grid;
  place-items: center;
  width: 65px;
  height: 65px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.shutter span {
  width: 49px;
  height: 49px;
  border-radius: 50%;
  background: #fff;
  transition: transform .12s ease;
}

.shutter:active span {
  transform: scale(.88);
}

.file-label {
  position: relative;
}

.image-dialog {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100dvh;
}

.image-editor-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: #050a14;
}

.image-editor-shell > .dialog-header {
  border-radius: 0;
}

.image-canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 10px;
  background:
    linear-gradient(45deg, #0e1727 25%, transparent 25%),
    linear-gradient(-45deg, #0e1727 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #0e1727 75%),
    linear-gradient(-45deg, transparent 75%, #0e1727 75%);
  background-color: #090f1b;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  overflow: hidden;
}

#imageEditorCanvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  touch-action: none;
}

.crop-selection {
  position: absolute;
  border: 2px solid #60a5fa;
  background: rgba(96, 165, 250, .11);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .42);
  pointer-events: none;
}

.image-tools {
  display: flex;
  min-height: 70px;
  padding: 7px 10px;
  gap: 5px;
  border-width: 1px 0;
  border-radius: 0;
  overflow-x: auto;
}

.image-tools button {
  display: grid;
  grid-template-rows: auto auto;
  place-items: center;
  flex: 0 0 78px;
  min-height: 54px;
  padding: 5px;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: .65rem;
}

.image-tools button:hover,
.image-tools button.is-active {
  color: white;
  border-color: var(--stroke);
  background: rgba(255, 255, 255, .09);
}

.tool-glyph {
  font-size: 1.15rem;
  line-height: 1;
}

.image-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(72px + var(--safe-bottom));
  padding: 10px 16px calc(10px + var(--safe-bottom));
  gap: 12px;
  border-width: 0;
  border-radius: 0;
}

.image-editor-footer p {
  margin: 0;
  color: var(--soft);
  font-size: .72rem;
}

.image-editor-footer > div {
  display: flex;
  gap: 9px;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 28px));
}

.availability-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100dvh - 28px);
}

.availability-dialog.is-hover-preview {
  position: fixed;
  inset: var(--availability-preview-top, 76px) auto auto var(--availability-preview-left, 12px);
  z-index: 120;
  width: min(460px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  max-height: var(--availability-preview-height, calc(100dvh - 100px));
  margin: 0;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .35);
}

.availability-dialog.is-hover-preview .availability-sheet {
  max-height: var(--availability-preview-height, calc(100dvh - 100px));
  border-radius: var(--radius-xl);
}

.availability-dialog.is-hover-preview .availability-content {
  min-height: 0;
  overscroll-behavior: contain;
}

.availability-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100dvh - 28px);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.availability-sheet .dialog-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .76rem;
}

.availability-content {
  min-height: 230px;
  padding: 15px;
  overflow-y: auto;
}

.availability-list {
  display: grid;
  gap: 8px;
}

.availability-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  padding: 12px;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  background: rgba(255, 255, 255, .045);
}

.availability-member-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.availability-member-copy > strong {
  flex: 1 1 150px;
  overflow-wrap: anywhere;
  font-size: .86rem;
}

.availability-loading {
  display: grid;
  gap: 9px;
}

.availability-loading .skeleton {
  display: block;
  height: 64px;
}

.availability-error,
.availability-empty {
  display: grid;
  place-content: center;
  min-height: 200px;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.availability-error strong {
  color: #fecdd3;
}

.availability-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: var(--soft);
  font-size: .7rem;
}

.availability-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.availability-footer svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.confirm-card {
  padding: 25px;
  border-radius: var(--radius-lg);
  text-align: center;
}

.confirm-card .empty-icon {
  margin-inline: auto;
}

.confirm-card p {
  color: var(--muted);
}

.confirm-card .button-row {
  justify-content: center;
}

.celebration-region,
.celebration-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.celebration-region {
  z-index: 260;
}

.celebration-region * {
  pointer-events: none;
}

.celebration-layer {
  display: grid;
  place-items: start center;
  padding: max(78px, 10vh) 16px 16px;
  overflow: hidden;
  isolation: isolate;
  animation: celebration-layer-in .24s ease both;
}

.celebration-layer.is-leaving {
  opacity: 0;
  transition: opacity .2s ease;
}

.celebration-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: min(590px, calc(100vw - 28px));
  padding: 18px 20px;
  gap: 13px;
  border-color: rgba(74, 222, 128, .34);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(13, 47, 39, .96), rgba(15, 31, 56, .97));
  box-shadow: 0 24px 85px rgba(0, 0, 0, .48), 0 0 45px rgba(74, 222, 128, .13);
  animation: celebration-card-in .42s cubic-bezier(.2, .85, .25, 1.2) both;
}

.celebration-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(134, 239, 172, .42);
  border-radius: 16px;
  color: #dcfce7;
  background: rgba(34, 197, 94, .24);
  font-size: 1.35rem;
  font-weight: 900;
}

.celebration-card .eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #86efac;
}

.celebration-card strong {
  display: block;
  overflow-wrap: anywhere;
  color: #f0fdf4;
  font-size: clamp(.92rem, 2.2vw, 1.12rem);
}

.celebration-fireworks {
  position: absolute;
  top: max(92px, 12vh);
  left: 50%;
  z-index: 1;
  width: 1px;
  height: 1px;
}

.celebration-fireworks span {
  position: absolute;
  width: 8px;
  height: 3px;
  border-radius: 999px;
  background: var(--particle-color);
  box-shadow: 0 0 8px var(--particle-color);
  opacity: 0;
  transform: rotate(var(--particle-angle)) translateX(26px);
  animation: celebration-particle 1.05s ease-out var(--particle-delay) both;
}

@keyframes celebration-layer-in {
  from { opacity: 0; }
}

@keyframes celebration-card-in {
  from { opacity: 0; transform: translateY(-18px) scale(.94); }
}

@keyframes celebration-particle {
  0% { opacity: 0; transform: rotate(var(--particle-angle)) translateX(20px) scale(.4); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--particle-angle)) translateX(var(--particle-distance)) scale(.15); }
}

.toast-region {
  position: fixed;
  right: 18px;
  bottom: calc(18px + var(--safe-bottom));
  z-index: 200;
  display: grid;
  width: min(390px, calc(100vw - 28px));
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 12px 13px;
  gap: 10px;
  border: 1px solid var(--stroke);
  border-radius: 15px;
  background: rgba(13, 26, 47, .95);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: toast-in .24s ease both;
}

.toast strong,
.toast small {
  display: block;
}

.toast small {
  color: var(--muted);
}

.toast > svg {
  color: var(--success);
}

.toast button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
}

.connection-banner {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 300;
  padding: 6px 12px;
  border-radius: 0 0 12px 12px;
  color: #3f2a02;
  background: #fde68a;
  box-shadow: var(--shadow-sm);
  font-size: .74rem;
  font-weight: 750;
  transform: translateX(-50%);
}

.connection-banner svg {
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

.mobile-tabs {
  display: none;
}

.view-loading {
  display: grid;
  gap: 20px;
}

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .13), rgba(255, 255, 255, .06));
  background-size: 240% 100%;
  animation: shimmer 1.2s linear infinite;
}

.skeleton-heading {
  width: min(430px, 70%);
  height: 44px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.skeleton-grid span {
  height: 150px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .07);
}

@keyframes shimmer {
  to { background-position: -240% 0; }
}

.noscript {
  position: fixed;
  inset: 20px;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 30px;
  border-radius: 20px;
  color: #fff;
  background: #101b33;
  text-align: center;
}

@media (max-width: 1180px) {
  .dashboard-grid,
  .report-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .asset-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .external-access-layout,
  .ticket-create-layout {
    grid-template-columns: 1fr;
  }

  .ticket-create-sidebar {
    position: static;
  }
}

@media (max-width: 930px) {
  :root {
    --topbar-height: 68px;
  }

  .topbar { padding-block: 3px; }

  .app-layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 310px);
    transform: translateX(-105%);
    transition: transform .25s ease;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .app-layout:has(.sidebar.is-open) ~ .mobile-tabs {
    visibility: hidden;
  }

  .sidebar-close,
  .mobile-menu {
    display: inline-grid !important;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, .52);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .topbar {
    padding-top: calc(3px + var(--safe-top));
  }

  .global-search {
    width: min(540px, 100%);
  }

  .content-grid,
  .ticket-create-layout,
  .detail-layout,
  .auth-setup-grid {
    grid-template-columns: 1fr;
  }

  .context-panel,
  .ticket-create-sidebar,
  .detail-sidebar {
    position: static;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-quick {
    grid-template-columns: repeat(2, 1fr);
  }

  .external-access-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 680px) {
  body {
    padding-bottom: calc(101px + var(--safe-bottom));
  }

  .topbar {
    gap: 9px;
  }

  .global-search {
    display: none;
  }

  .demo-chip {
    display: none;
  }

  .availability-button-label {
    display: none;
  }

  .availability-button {
    min-width: 42px;
    padding-inline: 9px;
  }

  .availability-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 88dvh;
    margin: auto 0 0;
  }

  .availability-sheet {
    max-height: 88dvh;
    border-radius: 22px 22px 0 0;
  }

  .availability-footer {
    align-items: stretch;
    flex-direction: column;
    padding-bottom: calc(12px + var(--safe-bottom));
  }

  .celebration-layer {
    padding-top: max(72px, 8vh);
  }

  .celebration-card {
    padding: 14px;
  }

  .celebration-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .main-content {
    padding: 17px 13px calc(26px + var(--safe-bottom));
  }

  .page-head {
    display: block;
    margin-bottom: 18px;
  }

  .page-actions {
    margin-top: 13px;
  }

  .page-actions > * {
    flex: 1 1 auto;
  }

  .hero-panel {
    min-height: 0;
    padding: 23px 18px;
    border-radius: 23px;
  }

  .hero-quick {
    grid-template-columns: 1fr;
  }

  .dashboard-grid,
  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-card,
  .report-card {
    min-height: 118px;
    padding: 14px;
  }

  .metric-card strong,
  .report-card strong {
    font-size: 1.45rem;
  }

  .panel {
    border-radius: 21px;
  }

  .section-head {
    align-items: center;
  }

  .category-grid,
  .asset-grid,
  .admin-grid,
  .article-grid,
  .access-grid,
  .portal-catalog-grid,
  .access-form-grid {
    grid-template-columns: 1fr;
  }

  .login-selection {
    min-height: 0;
    margin-top: 10px;
    padding: 32px 14px;
  }

  .login-choice-grid,
  .external-access-summary,
  .external-profile-grid {
    grid-template-columns: 1fr;
  }

  .external-profile-company {
    grid-column: auto;
  }

  .external-user-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-filter {
    flex-basis: auto;
    min-width: 0;
  }

  .external-access-row,
  .external-user-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .external-access-row .external-access-identity,
  .external-user-row .external-access-identity {
    grid-column: 1 / -1;
  }

  .external-user-row .external-user-avatar {
    grid-row: 1;
  }

  .external-user-row .external-access-identity {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .secret-entry {
    flex-wrap: wrap;
  }

  .secret-entry input {
    flex-basis: 100%;
  }

  .category-card {
    grid-template-columns: auto 1fr;
    min-height: 0;
    align-items: center;
  }

  .category-card small {
    grid-column: 2;
  }

  .step {
    justify-content: center;
  }

  .step > strong {
    display: none;
  }

  .step:not(:last-child)::after {
    position: absolute;
    right: -45%;
    width: 90%;
  }

  .choice-grid {
    grid-template-columns: 1fr;
  }

  .choice label {
    min-height: 62px;
  }

  .form-actions {
    position: sticky;
    bottom: calc(70px + var(--safe-bottom));
    z-index: 6;
    margin: 24px -10px -10px;
    padding: 10px;
    border: 1px solid var(--stroke);
    border-radius: 15px;
    background: rgba(8, 17, 31, .9);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }

  .form-actions button {
    flex: 1;
  }

  .auth-invitation {
    align-items: stretch;
  }

  .auth-invitation > div,
  .auth-invitation > button {
    width: 100%;
  }

  .ticket-title-row {
    display: block;
  }

  .ticket-title-row .status-pill {
    margin-top: 7px;
  }

  .reply-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .reply-submit-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .reply-actions .primary-button {
    width: 100%;
    min-width: 0;
    padding-inline: 12px;
  }

  .reply-submit-buttons:has([data-send-reply-close][hidden]) {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-label {
    display: none;
  }

  .ticket-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .ticket-table,
  .ticket-table tbody,
  .ticket-table tr,
  .ticket-table td {
    display: block;
    width: 100%;
  }

  .ticket-table thead {
    display: none;
  }

  .ticket-table tr {
    position: relative;
    margin-bottom: 9px;
    padding: 13px 12px 11px 44px;
    border: 1px solid var(--stroke);
    border-radius: 15px;
    background: rgba(255, 255, 255, .055);
  }

  .ticket-table td {
    padding: 3px 0;
    border: 0;
  }

  .ticket-table td:first-child {
    position: absolute;
    top: 16px;
    left: 13px;
    width: auto;
  }

  .ticket-table td:nth-child(n+4) {
    display: inline-block;
    width: auto;
    margin-right: 10px;
  }

  .filter-bar select {
    min-width: 125px;
  }

  .profile-panel {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .profile-large {
    margin-inline: auto;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .meta-list > div {
    grid-template-columns: 90px 1fr;
  }

  .mobile-tabs {
    position: fixed;
    right: 8px;
    bottom: calc(7px + var(--safe-bottom));
    left: 8px;
    z-index: 32;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 66px;
    padding: 5px;
    border-radius: 20px;
  }

  .mobile-tabs.is-external {
    grid-template-columns: repeat(4, 1fr);
  }

  .mobile-tabs.is-profile-required {
    grid-template-columns: 1fr;
  }

  .mobile-tabs button {
    display: grid;
    grid-template-rows: 25px auto;
    place-items: center;
    min-width: 0;
    padding: 4px 2px;
    gap: 2px;
    border: 0;
    border-radius: 14px;
    color: var(--soft);
    background: transparent;
    cursor: pointer;
    font-size: .64rem;
  }

  .mobile-tabs button.is-active {
    color: #bfdbfe;
    background: rgba(59, 130, 246, .18);
  }

  .mobile-tabs .mobile-create {
    position: relative;
    color: white;
  }

  .mobile-tabs .mobile-create svg {
    width: 37px;
    height: 37px;
    margin-top: -22px;
    padding: 9px;
    border: 3px solid #122039;
    border-radius: 50%;
    background: #3b82f6;
    box-sizing: content-box;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .4);
  }

  .mini-avatar {
    width: 24px;
    height: 24px;
    font-size: .55rem;
  }

  .toast-region {
    right: 12px;
    bottom: calc(82px + var(--safe-bottom));
  }

  .media-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100dvh;
    margin: 0;
  }

  .dialog-shell {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .camera-stage {
    min-height: 0;
  }

  .camera-stage video {
    height: 100%;
  }

  .camera-guide {
    inset: 8% 7%;
  }

  .camera-controls {
    min-height: calc(90px + var(--safe-bottom));
    padding-bottom: calc(10px + var(--safe-bottom));
  }

  .camera-controls .secondary-button {
    padding: 7px;
    font-size: .7rem;
  }

  .image-editor-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .image-editor-footer p {
    display: none;
  }

  .image-editor-footer > div {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
  }

  .connection-banner {
    width: max-content;
    max-width: calc(100vw - 18px);
    text-align: center;
  }
}

@media (max-width: 400px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 105px;
  }

  .camera-controls {
    gap: 5px;
  }

  .shutter {
    width: 58px;
    height: 58px;
  }

  .shutter span {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .orb {
    display: none;
  }

  .ticket-needs-attention {
    animation: none !important;
    border-color: rgba(251, 113, 133, .82) !important;
    box-shadow: 0 0 0 3px rgba(251, 113, 133, .14) !important;
  }

  .celebration-fireworks {
    display: none;
  }

  .celebration-card,
  .celebration-layer {
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .glass,
  .panel,
  .metric-card,
  .ticket-card,
  .category-card {
    border: 1px solid CanvasText;
  }

  .status-pill::before {
    forced-color-adjust: none;
  }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass,
  .panel,
  .topbar,
  .metric-card {
    background: rgba(16, 27, 51, .96);
  }
}

/* Greenshot capture and program catalog */
.capture-error {
  margin-bottom: 18px;
}

.capture-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 132px;
  align-items: center;
  margin: -6px -6px 24px;
  padding: 14px;
  gap: 14px;
  border: 1px solid rgba(52, 211, 153, .3);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .14), rgba(59, 130, 246, .08));
}

.capture-banner-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, .18);
}

.capture-banner-icon svg {
  width: 22px;
  height: 22px;
}

.capture-banner h2,
.capture-banner p {
  margin: 3px 0 0;
}

.capture-banner h2 {
  font-size: 1rem;
}

.capture-banner p {
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.capture-banner > img {
  width: 132px;
  height: 78px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(5, 10, 20, .42);
  object-fit: contain;
}

.capture-banner.is-discarded {
  border-color: rgba(245, 158, 11, .3);
  background: rgba(245, 158, 11, .08);
}

.capture-banner.is-discarded .capture-banner-icon {
  color: #fde68a;
  background: rgba(245, 158, 11, .16);
}

.capture-attachment-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  gap: 10px;
  border: 1px solid rgba(52, 211, 153, .22);
  border-radius: 13px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, .08);
  font-size: .75rem;
}

.capture-attachment-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.capture-attachment-actions svg {
  width: 16px;
  height: 16px;
}

.capture-attachment-actions.is-removed {
  border-color: rgba(245, 158, 11, .28);
  color: #fde68a;
  background: rgba(245, 158, 11, .09);
}

.capture-attachment-actions.is-removed > span {
  font-size: 0;
}

.capture-attachment-actions.is-removed > span::after {
  content: "Greenshot-Screenshot entfernt – du kannst eine Ersatzdatei auswählen.";
  font-size: .75rem;
}

.program-combobox {
  position: relative;
}

.program-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.program-input-wrap > svg {
  position: absolute;
  left: 13px;
  z-index: 1;
  width: 18px;
  height: 18px;
  color: var(--soft);
  pointer-events: none;
}

.program-input-wrap input {
  padding-right: 72px;
  padding-left: 41px;
}

.program-clear {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--soft);
  background: transparent;
  cursor: pointer;
}

.program-clear:hover,
.program-clear:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
}

.program-clear svg {
  width: 16px;
  height: 16px;
}

.program-search-spinner {
  position: absolute;
  right: 46px;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(148, 163, 184, .25);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: program-search-spin .7s linear infinite;
}

@keyframes program-search-spin {
  to { transform: rotate(360deg); }
}

.program-listbox {
  position: absolute;
  top: 72px;
  right: 0;
  left: 0;
  z-index: 25;
  max-height: min(390px, 52vh);
  padding: 6px;
  border: 1px solid var(--stroke-strong);
  border-radius: 15px;
  background: rgba(12, 22, 41, .98);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .38);
  overflow-y: auto;
}

.program-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px;
  gap: 10px;
  border-radius: 11px;
  cursor: pointer;
}

.program-option:hover,
.program-option[aria-selected="true"] {
  color: white;
  background: rgba(59, 130, 246, .2);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, .24);
}

.program-option.is-unlisted {
  margin-top: 4px;
  border-top: 1px solid var(--stroke);
  border-radius: 0 0 11px 11px;
  color: var(--muted);
}

.program-option-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .14);
}

.program-option-icon svg {
  width: 17px;
  height: 17px;
}

.program-option strong,
.program-option small {
  display: block;
}

.program-option small {
  margin-top: 2px;
  color: var(--soft);
  font-size: .7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-ranking {
  padding: 4px 7px;
  border-radius: 99px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .13);
  font-size: .62rem;
  white-space: nowrap;
}

.program-empty {
  padding: 18px 12px;
  color: var(--muted);
  text-align: center;
  font-size: .78rem;
}

.program-selection {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  gap: 8px;
  border-radius: 10px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .1);
}

.program-selection > svg {
  width: 16px;
  height: 16px;
}

.program-selection strong,
.program-selection small {
  display: block;
}

.program-selection small {
  color: var(--soft);
  font-size: .68rem;
}

.ticket-program-tag svg,
.kanban-program svg {
  width: 14px;
  height: 14px;
}

.kanban-program {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 7px;
  gap: 5px;
  border-radius: 8px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, .12);
  font-size: .68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program-admin-head {
  align-items: end;
}

.program-admin-search {
  width: min(390px, 100%);
}

.program-admin-editor {
  margin-bottom: 18px;
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.program-admin-loading {
  display: grid;
  gap: 8px;
}

.program-admin-loading .skeleton {
  display: block;
  height: 58px;
  border-radius: 12px;
}

.program-admin-state {
  padding: 34px 12px;
}

.program-admin-table .is-inactive {
  opacity: .64;
}

.program-alias-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.program-alias-list .tag {
  padding: 3px 7px;
  font-size: .64rem;
}

.program-row-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

@media (max-width: 760px) {
  .capture-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .capture-banner > img {
    grid-column: 1 / -1;
    width: 100%;
    height: min(180px, 30vh);
  }

  .capture-attachment-actions,
  .program-admin-head {
    align-items: stretch;
    flex-direction: column;
  }

  .capture-attachment-actions .button-row,
  .capture-attachment-actions button,
  .program-admin-search {
    width: 100%;
  }

  .capture-attachment-actions .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .program-option {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .program-ranking {
    display: none;
  }

  .program-admin-table-wrap {
    overflow-x: auto;
  }

  .program-admin-table {
    min-width: 780px;
  }
}

html[data-theme="light"] .program-listbox {
  background: rgba(255, 255, 255, .99);
  box-shadow: 0 18px 48px rgba(15, 23, 42, .2);
}

html[data-theme="light"] .program-option:hover,
html[data-theme="light"] .program-option[aria-selected="true"] {
  color: #0f172a;
}

@media (forced-colors: active) {
  .capture-banner,
  .program-listbox,
  .program-option[aria-selected="true"] {
    border: 1px solid CanvasText;
  }
}
[data-admin-mail-root] [hidden] { display: none !important; }
[data-admin-mail-root] .status-pill { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
[data-admin-mail-root] .mail-test-receipt { overflow-wrap: anywhere; }

[data-admin-overview-root] .admin-card {
  position: relative;
  padding-right: 40px;
}

.admin-status-dot {
  display: inline-block;
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 50%;
}

[data-admin-overview-root] .admin-card > .admin-status-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 13px;
  height: 13px;
}

.admin-status-dot.is-green { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .35); }
.admin-status-dot.is-yellow { background: #facc15; box-shadow: 0 0 8px rgba(250, 204, 21, .25); }
.admin-status-dot.is-red { background: #f87171; box-shadow: 0 0 8px rgba(248, 113, 113, .3); }

.admin-status-toolbar,
.admin-status-legend,
.admin-status-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.admin-status-toolbar { justify-content: space-between; margin: 0 0 18px; }
.admin-status-legend { font-size: .75rem; }
.admin-status-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.admin-status-actions small { color: var(--muted); }

[data-admin-integrations-root] [hidden] { display: none !important; }
.integration-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, .03);
  color: var(--muted);
  font-size: .85rem;
}
.integration-notice [data-tone="danger"] { color: #fda4af; }
.integration-notice [data-tone="warning"] { color: #fde68a; }
.integration-notice [data-tone="success"] { color: #86efac; }
.integration-profile-grid,
.integration-setup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.integration-setup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integration-profile-card { position: relative; min-width: 0; }
.integration-profile-card > .admin-status-dot { position: absolute; top: 20px; right: 20px; }
.integration-profile-card h2 { padding-right: 24px; }
.integration-status-reason { min-height: 42px; margin-top: 10px; color: var(--muted); font-size: .85rem; }
.integration-facts { display: grid; gap: 12px; margin: 18px 0; }
.integration-facts > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.integration-facts dt { color: var(--muted); font-size: .78rem; }
.integration-facts dd { margin: 0; font-size: .8rem; overflow-wrap: anywhere; }
.integration-setup-grid .auth-setup-card { min-width: 0; align-content: start; }
.integration-setup-grid .auth-setup-card > button { width: 100%; justify-content: center; white-space: normal; }
.integration-setup-grid .auth-setup-card > p { color: var(--muted); font-size: .8rem; }
@media (max-width: 1100px) {
  .integration-setup-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .integration-profile-grid { grid-template-columns: minmax(0, 1fr); }
  .integration-facts > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .integration-status-reason { min-height: 0; }
}

@media (forced-colors: active) {
  .admin-status-dot { border: 2px solid CanvasText; }
}

[data-contact-directory-link] { min-width: 0; }
[data-contact-directory-link] [hidden] { display: none !important; }
[data-contact-directory-link] .contact-link-intro { max-width: 78ch; color: var(--muted); font-size: .9rem; }
[data-contact-directory-link] .contact-link-form { display: grid; gap: 16px; justify-items: start; margin-top: 22px; }
[data-contact-directory-link] .contact-link-fields { display: grid; grid-template-columns: minmax(0, 1fr); width: min(100%, 620px); }
[data-contact-directory-link] .field input { background: var(--bg-1); }
[data-contact-directory-link] .field-help { color: var(--muted); }
[data-contact-directory-link] .contact-link-message { margin: 18px 0 0; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
[data-contact-directory-link] .contact-link-message:empty { display: none; }
[data-contact-directory-link] .contact-link-message[data-tone="danger"] { color: var(--danger); }
[data-contact-directory-link] .contact-link-message[data-tone="warning"] { color: var(--warning); }
[data-contact-directory-link] .contact-link-message[data-tone="success"] { color: var(--success); }
[data-contact-directory-link] [data-contact-link-reauth] { margin-top: 12px; }
[data-contact-directory-link] .contact-link-preview { margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--stroke); outline: none; }
[data-contact-directory-link] .contact-link-preview:focus-visible { border-radius: 8px; box-shadow: var(--focus); }
[data-contact-directory-link] .contact-link-comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
[data-contact-directory-link] .contact-link-summary { min-width: 0; padding: 18px; border: 1px solid var(--stroke); border-radius: 16px; background: var(--surface); }
[data-contact-directory-link] .contact-link-summary h3 { margin-bottom: 16px; font-size: .9rem; }
[data-contact-directory-link] .contact-link-summary dl { display: grid; gap: 12px; margin: 0; }
[data-contact-directory-link] .contact-link-summary dl > div { display: grid; gap: 3px; }
[data-contact-directory-link] .contact-link-summary dt { font-size: .74rem; color: var(--muted); }
[data-contact-directory-link] .contact-link-summary dd { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
[data-contact-directory-link] .contact-link-consent { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; font-size: .85rem; cursor: pointer; }
[data-contact-directory-link] .contact-link-consent input { flex: 0 0 19px; width: 19px; height: 19px; margin: 1px 0 0; accent-color: var(--primary-strong); }
[data-contact-directory-link] .contact-link-preview > button { margin-bottom: 10px; }
[data-contact-directory-link] .contact-link-result { margin-bottom: 0; overflow-wrap: anywhere; }
[data-contact-directory-link] button { max-width: 100%; white-space: normal; }
html[data-theme="light"] [data-contact-directory-link] .contact-link-message[data-tone="danger"] { color: #be123c; }
html[data-theme="light"] [data-contact-directory-link] .contact-link-message[data-tone="warning"] { color: #92400e; }
html[data-theme="light"] [data-contact-directory-link] .contact-link-message[data-tone="success"] { color: #166534; }
@media (max-width: 680px) {
  [data-contact-directory-link] .contact-link-fields,
  [data-contact-directory-link] .contact-link-comparison { grid-template-columns: minmax(0, 1fr); }
  [data-contact-directory-link] .contact-link-form > button,
  [data-contact-directory-link] .contact-link-preview > button { width: 100%; justify-content: center; }
}
@media (forced-colors: active) {
  [data-contact-directory-link] .contact-link-message[data-tone] { color: CanvasText; }
}

.attachment-filename-link { color: inherit; text-decoration: none; }
.attachment-filename-link:hover { color: #bfdbfe; text-decoration: underline; }
.attachment-filename-link:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; border-radius: 3px; }

/* Central administrator confidentiality controls share the bound identity row. */
.admin-confidential-intro { margin: 1.25rem 0 .65rem; color: var(--muted); line-height: 1.5; }
.admin-confidential-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.admin-confidential-toolbar p { margin: 0; }
.auth-invitation-identity { overflow-wrap: anywhere; flex: 1 1 15rem; }
.auth-invitation > .admin-confidential-row { display: flex; flex: 1 1 100%; width: 100%; min-width: 0; margin: .3rem 0 0; padding-top: .7rem; border-top: 1px solid var(--stroke); align-items: center; gap: .8rem; }
.admin-confidential-copy { display: flex; flex: 1; flex-wrap: wrap; min-width: 0; align-items: center; gap: .45rem .7rem; }
.admin-confidential-copy small { flex-basis: 100%; }
.admin-confidential-row > button { flex-shrink: 0; min-width: 7rem; }
.admin-confidential-pending { flex-basis: 100%; }
.admin-ticket-mail-intro { margin: 1rem 0 .65rem; color: var(--muted); line-height: 1.5; }
.auth-invitation > .admin-ticket-mail-row { display: flex; flex: 1 1 100%; width: 100%; min-width: 0; align-items: center; gap: .7rem; border-top: 1px solid var(--stroke); padding-top: .7rem; }
.admin-ticket-mail-toggle { display: flex; flex: 1; align-items: center; min-width: 0; gap: .7rem; padding: .4rem 0; cursor: pointer; }
.admin-ticket-mail-toggle input { flex: 0 0 20px; width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; accent-color: #3b82f6; }
.admin-ticket-mail-toggle input:focus-visible { outline: 3px solid #60a5fa; outline-offset: 4px; }
.admin-ticket-mail-toggle input:disabled { cursor: not-allowed; opacity: .55; }
.admin-ticket-mail-copy { display: grid; min-width: 0; gap: .3rem; }
.admin-ticket-mail-copy small { line-height: 1.5; }
.admin-ticket-mail-row > .status-pill { flex-shrink: 0; }
@media (max-width: 600px) {
  .auth-invitation > .admin-confidential-row { align-items: stretch; flex-direction: column; }
  .admin-confidential-row > button { width: 100%; }
  .auth-invitation > .admin-ticket-mail-row { flex-wrap: wrap; }
  .admin-ticket-mail-toggle { flex-basis: 100%; }
  .admin-ticket-mail-row > .status-pill { margin: -.2rem 0 0 calc(20px + .7rem); }
}

/* Employee photos are private browser-memory thumbnails. Initials remain the fallback. */
[data-employee-photo] { position: relative; overflow: hidden; }
[data-employee-photo] > .employee-photo { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: inherit; }
.employee-avatar, .profile-compact [data-shell-avatar] { width: 60px; height: 60px; font-size: .95rem; }
.profile-large[data-employee-photo] { border-radius: 50%; }

.auth-invitation > .auth-invitation-person { display: flex; align-items: center; gap: 12px; flex: 1 1 100%; min-width: 0; width: 100%; }
.auth-invitation-person .auth-invitation-identity { min-width: 0; display: grid; gap: 3px; }
.employee-photo-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.employee-photo-actions > button { flex: 0 1 auto; max-width: 100%; white-space: normal; }
