:root {
  --ui-scale: 1;
  --bg: #f4f0e8;
  --bg-panel: rgba(255, 251, 245, 0.82);
  --bg-soft: rgba(255, 255, 255, 0.56);
  --ink: #14233b;
  --ink-soft: #596579;
  --navy: #07356e;
  --navy-deep: #041f43;
  --amber: #f1a93b;
  --border: rgba(20, 35, 59, 0.12);
  --shadow: 0 24px 60px rgba(7, 30, 67, 0.14);
  --shadow-tight: 0 12px 28px rgba(7, 30, 67, 0.1);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(241, 169, 59, 0.26), transparent 26%),
    radial-gradient(circle at right 20%, rgba(7, 53, 110, 0.1), transparent 22%),
    linear-gradient(135deg, #f8f4ee 0%, #efe7da 44%, #f9f6f0 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100dvh;
}

.login-view {
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 540px) minmax(360px, 1fr);
  overflow: hidden;
}

.login-card,
.login-panel {
  position: relative;
}

.login-card {
  display: grid;
  grid-template-rows: auto auto;
  align-items: start;
  justify-items: center;
  align-content: center;
  gap: clamp(14px, 1.8vh, 22px);
  min-height: 100%;
  padding: clamp(24px, 4.5vh, 48px) min(6vw, 78px);
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  grid-row: 1;
  width: min(100%, 420px);
  margin-top: -8px;
  color: inherit;
  text-decoration: none;
}

.login-brand img {
  width: clamp(44px, 5vw, 68px);
  height: clamp(44px, 5vw, 68px);
  object-fit: contain;
}

.login-brand-copy {
  display: grid;
  gap: 4px;
}

.login-brand-name {
  font-family: var(--font-body);
  font-size: clamp(22px, 1.85vw, 32px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 800;
  color: var(--navy);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 800;
  color: var(--navy);
}

.login-brand:hover .login-brand-name,
.login-brand:hover .eyebrow {
  opacity: 0.82;
}

.login-copy h1,
.portal-header h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.login-copy h1 {
  max-width: none;
  font-size: clamp(16px, 1.55vw, 26px);
  margin-inline: auto;
}

.login-copy h1 span {
  display: block;
  white-space: nowrap;
}

.login-copy {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  width: 100%;
}

.login-form {
  grid-row: 2;
  width: min(100%, 420px);
  justify-self: center;
  display: grid;
  gap: clamp(12px, 1.8vh, 18px);
  padding: clamp(22px, 2.8vh, 30px);
  background: var(--bg-panel);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  align-self: center;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field input {
  height: clamp(46px, 5vh, 54px);
  border-radius: 14px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: rgba(255, 255, 255, 0.76);
  padding: 0 16px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.field input:focus {
  border-color: rgba(7, 53, 110, 0.44);
  box-shadow: 0 0 0 4px rgba(7, 53, 110, 0.09);
  transform: translateY(-1px);
}

.primary-button {
  height: clamp(48px, 5.2vh, 56px);
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--navy) 0%, #0a4d9d 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: var(--shadow-tight);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.status-text {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.status-text.is-error {
  color: #ae2b2b;
}

.status-text.is-success {
  color: #117548;
}

.helper-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.65;
}

.login-panel {
  padding: clamp(20px, 3vh, 34px);
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 18px 18px 18px 0;
  border-radius: 40px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(145deg, var(--navy) 0%, var(--navy-deep) 100%);
  background-size: 34px 34px, 34px 34px, cover;
}

.ambient-grid::after {
  content: "";
  position: absolute;
  inset: auto -10% -25% 28%;
  height: 420px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 60%);
  filter: blur(14px);
}

.operations-tree {
  position: absolute;
  inset: 18px 18px 18px 0;
  z-index: 1;
  display: grid;
  place-items: center;
  border-radius: 40px;
  overflow: hidden;
}

.operations-tree::before,
.operations-tree::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  pointer-events: none;
}

.operations-tree::before {
  width: min(34vw, 380px);
  height: min(34vw, 380px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 68%);
}

.operations-tree::after {
  width: min(28vw, 300px);
  height: min(28vw, 300px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 0 34px rgba(255, 255, 255, 0.022),
    0 0 0 76px rgba(255, 255, 255, 0.012);
}

.operations-tree-stage {
  position: relative;
  width: min(88%, 700px);
  aspect-ratio: 1 / 1;
}

.operations-tree-lines,
.operations-tree-nodes {
  position: absolute;
  inset: 0;
}

.tree-core {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: clamp(92px, 9vw, 124px);
  height: clamp(92px, 9vw, 124px);
  display: grid;
  place-items: center;
  border-radius: 36px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 44px rgba(3, 17, 37, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06)),
    rgba(7, 25, 55, 0.78);
  z-index: 2;
}

.tree-core-logo {
  width: clamp(40px, 4.2vw, 56px);
  height: clamp(40px, 4.2vw, 56px);
  object-fit: contain;
}

.operations-tree line {
  stroke-linecap: round;
}

.tree-node {
  position: absolute;
  width: clamp(50px, 5.4vw, 68px);
  height: clamp(50px, 5.4vw, 68px);
  display: grid;
  place-items: center;
  border-radius: 16px;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 34px rgba(3, 17, 37, 0.1);
  background: rgba(255, 255, 255, 0.055);
}

.tree-node svg {
  width: 22px;
  height: 22px;
  stroke-width: 2px;
  color: rgba(255, 255, 255, 0.96);
}

.tree-node-depth-1 {
  z-index: 2;
}

.tree-node-depth-2 {
  width: clamp(48px, 5vw, 62px);
  height: clamp(48px, 5vw, 62px);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 22px rgba(3, 17, 37, 0.08);
  opacity: 0.74;
}

.tree-node-depth-2 svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2px;
  color: rgba(255, 255, 255, 0.8);
}

.tree-node-depth-3 {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  opacity: 0.62;
}

.tree-node-depth-3 svg {
  width: 19px;
  height: 19px;
  color: rgba(255, 255, 255, 0.72);
}

.tree-node-depth-4 {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
  border-color: rgba(255, 255, 255, 0.036);
  box-shadow: none;
  opacity: 0.46;
}

.tree-node-depth-4 svg {
  width: 17px;
  height: 17px;
  color: rgba(255, 255, 255, 0.6);
}


.portal-view {
  position: fixed;
  inset: 0;
  height: calc(100dvh / var(--ui-scale));
  width: calc(100vw / var(--ui-scale));
  transform: scale(var(--ui-scale));
  transform-origin: top left;
  display: grid;
  grid-template-columns: 88px 1fr;
  overflow: hidden;
}

.portal-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0 128px;
  background: linear-gradient(180deg, #07356e 0%, #052c5a 100%);
  border-right: 1px solid rgba(7, 53, 110, 0.18);
}

.portal-sidebar-top,
.portal-sidebar-bottom,
.portal-nav {
  display: grid;
  justify-items: center;
  gap: 16px;
}

.portal-sidebar-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  gap: 8px;
}

.portal-sidebar-top {
  gap: 30px;
}

.portal-logo {
  width: auto;
  height: auto;
  display: grid;
  place-items: center;
}

.portal-logo img {
  width: auto;
  height: 28px;
  max-width: 100%;
  object-fit: contain;
}

.portal-nav-item {
  width: 56px;
  min-height: 62px;
  padding: 8px 4px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  border: none;
  border-radius: 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.portal-nav.is-loading .portal-nav-item {
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
}

.portal-nav-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 240ms ease,
    transform 260ms ease,
    background 0.18s ease,
    color 0.18s ease;
  transition-delay: calc(var(--nav-index, 0) * 55ms);
}

.portal-nav-item:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.portal-nav-item.is-active {
  background: rgba(241, 169, 59, 0.18);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(241, 169, 59, 0.28);
}

.portal-nav-item svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.45px;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
}

.portal-nav-item-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: inherit;
}

.portal-nav-item-secondary {
  width: 48px;
  min-height: 48px;
  padding: 0;
  place-items: center;
  gap: 0;
}

.portal-nav-item[data-sign-out] {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.portal-nav-item[data-sign-out]::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(208, 48, 55, 0.9), rgba(180, 31, 39, 0.9));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
  z-index: 0;
}

.portal-nav-item[data-sign-out] > * {
  position: relative;
  z-index: 1;
}

.portal-nav-item[data-sign-out]:hover::before,
.portal-nav-item[data-sign-out]:focus-visible::before {
  transform: scaleX(1);
}

.portal-nav-item[data-sign-out]:hover,
.portal-nav-item[data-sign-out]:focus-visible {
  color: #fff;
}

.scale-popover {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 12;
  width: 232px;
  border-radius: 12px;
  border: 1px solid rgba(7, 53, 110, 0.22);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(7, 30, 67, 0.22);
  padding: 12px;
  transform: none;
}

.scale-floating-dock {
  position: fixed;
  left: 96px;
  bottom: 132px;
  z-index: 30;
}

.scale-popover-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.scale-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--navy);
}

.scale-popover-range {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
  color: var(--ink-soft);
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 30, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(180deg, rgba(16, 36, 69, 0.98), rgba(10, 25, 50, 0.98));
  color: #fff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.confirm-modal-dialog h3 {
  margin: 0;
  font-size: 22px;
}

.confirm-modal-dialog p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
}

.confirm-modal-actions {
  margin-top: 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-button {
  min-width: 96px;
  height: 40px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.modal-button-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

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

.modal-button-danger {
  background: linear-gradient(135deg, #bf2f35, #9f1e25);
  color: #fff;
}

.modal-button-danger:hover {
  filter: brightness(1.08);
}

@media (min-width: 721px) {
  .portal-nav {
    width: 100%;
    gap: 16px;
    justify-items: stretch;
    padding: 0;
  }

  .portal-nav-item {
    width: 100%;
    min-height: 66px;
    border-radius: 0;
  }

  .portal-nav-item:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .portal-nav-item[data-sign-out]:hover,
  .portal-nav-item[data-sign-out]:focus-visible {
    background: transparent;
  }

  .portal-nav-item.is-active {
    border-radius: 0;
    background: rgba(241, 169, 59, 0.16);
    box-shadow: none;
  }
}

.portal-main {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 16px 24px;
  color: #fff;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-header-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.portal-header-prefix {
  color: inherit;
  font-weight: inherit;
}

.portal-header-separator-muted {
  color: inherit;
  font-weight: inherit;
}

.portal-header-user {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.92;
}

.portal-content {
  flex: 1;
  min-height: 0;
  display: grid;
  gap: 0;
  padding: 0;
}

.portal-content.portal-content-loading {
  place-items: center;
  gap: 0;
}

.tickets-page {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  background: rgba(255, 255, 255, 0.34);
}

.tickets-sidebar-panel {
  min-height: 0;
  padding: 22px 18px;
  border-right: 1px solid rgba(20, 35, 59, 0.12);
  background: rgba(255, 255, 255, 0.44);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 20px;
}

.tickets-sidebar-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.tickets-sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tickets-sidebar-count {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
}

.tickets-type-switch {
  display: grid;
  gap: 8px;
}

.tickets-type-button {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(20, 35, 59, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}

.tickets-type-button.is-active {
  border-color: rgba(7, 53, 110, 0.22);
  background: rgba(7, 53, 110, 0.1);
  color: var(--navy);
}

.tickets-assigned-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.tickets-list-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.tickets-list-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(20, 35, 59, 0.2);
  border-top-color: var(--navy);
  animation: dashboard-spin 0.8s linear infinite;
}

.tickets-list-empty {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.tickets-assigned-item {
  position: relative;
  width: 100%;
  border: 1px solid rgba(20, 35, 59, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 12px;
  text-align: left;
  display: grid;
  gap: 7px;
}

.tickets-assigned-item strong {
  font-size: 15px;
  color: #111827;
}

.tickets-assigned-item span {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
}

.tickets-assigned-meta {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tickets-assigned-item.is-selected {
  border-color: rgba(7, 53, 110, 0.22);
  background: rgba(7, 53, 110, 0.08);
}

.tickets-assigned-item.is-high-priority::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cc2424;
}

.tickets-main-panel {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0;
}

.tickets-main-panel.is-detail {
  grid-template-rows: minmax(0, 1fr);
}

.tickets-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid rgba(20, 35, 59, 0.1);
  border-bottom: 1px solid rgba(20, 35, 59, 0.1);
  background: rgba(255, 255, 255, 0.64);
}

.tickets-kpi-card {
  border-right: 1px solid rgba(20, 35, 59, 0.1);
  border-radius: 0;
  background: transparent;
  padding: 8px 14px;
  min-height: 72px;
  display: grid;
  align-content: start;
}

.tickets-kpi-card:last-child {
  border-right: none;
}

.tickets-kpi-card span {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.tickets-kpi-card strong {
  display: block;
  margin-top: 3px;
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.kpi-stars {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 3px;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  margin-top: 0;
}

.tickets-kpi-card .kpi-stars > span {
  display: inline-block;
}

.tickets-kpi-card strong.kpi-stars {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-top: 3px;
  transform: none;
}

.kpi-stars .star-on {
  color: var(--navy);
}

.kpi-stars .star-muted-tone {
  color: rgba(7, 53, 110, 0.58);
}

.kpi-stars .star-half-text {
  margin-left: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}

.kpi-stars .star-on {
  color: var(--navy);
}

.kpi-stars .star-muted-tone {
  color: rgba(7, 53, 110, 0.78);
}

.kpi-stars .star-half {
  background: linear-gradient(90deg, var(--navy) 50%, rgba(7, 53, 110, 0.78) 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.tickets-table-shell {
  min-height: 0;
  border: 1px solid rgba(20, 35, 59, 0.1);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  overflow: auto;
}

.tickets-table-controls {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 170px 170px 190px 170px auto auto;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(20, 35, 59, 0.1);
  background: rgba(255, 255, 255, 0.64);
}

.tickets-filter-field {
  display: grid;
  gap: 5px;
}

.tickets-filter-field span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.tickets-filter-field input,
.tickets-filter-field select {
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  padding: 0 10px;
}

.tickets-filter-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10.5L12 6.5' stroke='%2329394f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}

.tickets-filter-field select option {
  background: #ffffff;
  color: #1f2d44;
}

.tickets-custom-select {
  position: relative;
}

.tickets-custom-select-trigger {
  width: 100%;
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tickets-custom-select-trigger svg {
  width: 14px;
  height: 14px;
  color: #29394f;
}

.tickets-custom-select-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  width: 100%;
  z-index: 20;
  border-radius: 10px;
  border: 1px solid rgba(20, 35, 59, 0.16);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 35, 59, 0.14);
  overflow: auto;
  max-height: 220px;
  padding: 4px;
}

.tickets-custom-select-option {
  width: 100%;
  border: none;
  background: transparent;
  color: #1f2d44;
  text-align: left;
  font-size: 14px;
  border-radius: 7px;
  padding: 7px 8px;
}

.tickets-custom-select-option:hover,
.tickets-custom-select-option.is-selected {
  background: rgba(7, 53, 110, 0.1);
  color: #163560;
}

.tickets-filter-field input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

.tickets-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  align-self: end;
  gap: 10px;
}

.tickets-filter-create {
  justify-self: end;
  align-self: end;
}

.tickets-filter-button {
  height: 38px;
  border-radius: 9px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px;
}

.tickets-filter-button-primary {
  border-color: rgba(7, 53, 110, 0.18);
  background: #0f3f86;
  color: #ffffff;
}

.tickets-filter-button-icon {
  width: 38px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.tickets-filter-button-icon svg {
  width: 15px;
  height: 15px;
}

.tickets-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.tickets-table th,
.tickets-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(20, 35, 59, 0.08);
  text-align: center;
  font-size: 16px;
  white-space: nowrap;
}

.tickets-table th {
  padding-top: 9px;
  padding-bottom: 9px;
  position: sticky;
  top: 0;
  z-index: 1;
  background: #eef2f8;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 14px;
}

.tickets-table tbody tr:hover {
  background: rgba(7, 53, 110, 0.04);
}

.tickets-table-row {
  cursor: pointer;
  transition: background-color 120ms ease;
}

.tickets-table-row.is-selected {
  background: rgba(7, 53, 110, 0.08);
}

.tickets-table-id-cell {
  position: relative;
}

.tickets-priority-dot {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cc2424;
  transform: translateY(-50%);
}

.tickets-empty-row {
  text-align: center !important;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 26px 16px !important;
}

.tickets-table-pagination {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 10px 12px;
  border-top: 1px solid rgba(20, 35, 59, 0.1);
  background: rgba(255, 255, 255, 0.94);
}

.tickets-pagination-inner {
  display: inline-flex;
  align-items: center;
  gap: 18px;
}

.tickets-pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.tickets-pagination-size-field {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tickets-pagination-size input {
  width: 106px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  padding: 0 42px 0 10px;
  font-size: 14px;
  color: var(--ink);
  text-align: center;
}

.tickets-pagination-size-suffix {
  position: absolute;
  right: 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  pointer-events: none;
}

.tickets-pagination-size-field:focus-within .tickets-pagination-size-suffix {
  opacity: 0;
}

.tickets-pagination-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tickets-pagination-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.tickets-pagination-button:disabled {
  opacity: 0.45;
}

.tickets-pagination-button svg {
  width: 16px;
  height: 16px;
}

.tickets-pagination-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.tickets-detail-shell {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #ffffff;
  border-left: 1px solid rgba(20, 35, 59, 0.08);
}

.tickets-main-panel.is-detail .tickets-detail-shell {
  min-height: 0;
  height: 100%;
}

.tickets-detail-top {
  padding: 12px 0 12px 16px;
  border-bottom: 1px solid rgba(20, 35, 59, 0.1);
  background: #ffffff;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 780px);
  align-items: stretch;
  gap: 0;
}

.tickets-detail-top-controls {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 0;
}

.tickets-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(20, 35, 59, 0.12);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 700;
}

.tickets-back-button svg {
  width: 17px;
  height: 17px;
}

.tickets-priority-button {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(176, 32, 32, 0.22);
  background: rgba(255, 255, 255, 0.9);
  color: #9b2020;
  font-weight: 700;
}

.tickets-priority-button.is-active {
  border-color: rgba(176, 32, 32, 0.32);
  background: rgba(176, 32, 32, 0.12);
}

.tickets-detail-grid {
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(340px, 780px);
}

@media (max-width: 1560px) {
  .tickets-detail-top {
    grid-template-columns: minmax(340px, 1fr) minmax(340px, 41vw);
  }

  .tickets-detail-grid {
    grid-template-columns: minmax(340px, 1fr) minmax(340px, 41vw);
  }
}

.tickets-detail-info {
  min-height: 0;
  padding: 16px;
  border-right: 1px solid rgba(20, 35, 59, 0.1);
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  background: #f9fafb;
}

.tickets-detail-info h3,
.tickets-detail-chat h3 {
  margin: 0;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.tickets-detail-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.tickets-detail-id {
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.tickets-detail-body {
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-auto-rows: min-content;
  gap: 6px;
  align-content: start;
  border-top: 1px solid rgba(20, 35, 59, 0.1);
}

.tickets-detail-row {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(20, 35, 59, 0.1);
}

.tickets-detail-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tickets-detail-row-contact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: end;
}

.tickets-detail-row-single,
.tickets-detail-row-summary {
  grid-template-columns: 1fr;
}

.tickets-detail-item {
  display: grid;
  gap: 4px;
}

.tickets-detail-item span {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 800;
  color: var(--ink-soft);
}

.tickets-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tickets-detail-label em {
  font-style: normal;
}

.tickets-detail-label svg {
  width: 14px;
  height: 14px;
  color: #5f6b80;
}

.tickets-detail-item strong {
  font-size: 17px;
  color: var(--ink);
}

.tickets-detail-item p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-line;
}

.tickets-email-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tickets-email-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: #6a7486;
  text-decoration: none;
  padding: 0;
}

.tickets-email-button svg {
  width: 14px;
  height: 14px;
}

.tickets-email-button.is-copied svg {
  display: none;
}

.tickets-email-button.is-copied::before {
  content: "✓";
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.tickets-detail-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(20, 35, 59, 0.12);
  background: linear-gradient(to top, #f9fafb 78%, rgba(249, 250, 251, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.tickets-assign-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: var(--ink-soft);
}

.tickets-assign-label {
  margin-right: 2px;
}

.tickets-assign-current {
  min-height: 44px;
  min-width: 270px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tickets-assign-current svg {
  width: 17px;
  height: 17px;
  margin-left: auto;
}

.tickets-assign-dropdown {
  position: absolute;
  left: 64px;
  bottom: calc(100% + 8px);
  min-width: 180px;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(20, 35, 59, 0.12);
  display: grid;
  padding: 6px;
  gap: 4px;
}

.tickets-assign-option {
  border: none;
  background: transparent;
  color: var(--ink);
  text-align: left;
  border-radius: 8px;
  padding: 10px 10px;
  font-size: 15px;
  font-weight: 700;
}

.tickets-assign-option:hover,
.tickets-assign-option.is-selected {
  background: rgba(7, 53, 110, 0.08);
}

.tickets-ticket-actions {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.tickets-action-solved {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid #117548;
  background: #117548;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.tickets-action-close {
  border: none;
  background: transparent;
  color: #6a7486;
  font-size: 15px;
  font-weight: 700;
  padding: 0;
}

.tickets-detail-chat {
  min-height: 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  background: #ffffff;
}

.tickets-chat-thread {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
  padding-right: 2px;
}

.tickets-chat-row {
  width: 100%;
  display: grid;
  gap: 5px;
}

.tickets-chat-row.is-agent {
  justify-items: start;
}

.tickets-chat-row.is-customer {
  justify-items: end;
}

.tickets-chat-message {
  width: fit-content;
  max-width: min(76%, 620px);
  border-radius: 14px;
  padding: 10px 14px 9px;
  border: none;
  background: #eef2f7;
  display: inline-grid;
  gap: 8px;
  justify-self: start;
}

.tickets-chat-message.is-agent {
  justify-self: start;
  background: #edf1f6;
}

.tickets-chat-message.is-customer {
  justify-self: end;
  background: #26469a;
}

.tickets-chat-time {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #6a7486;
  justify-self: end;
}

.tickets-chat-row.is-agent .tickets-chat-time {
  justify-self: start;
}

.tickets-chat-row.is-customer .tickets-chat-time {
  color: #3f5c9e;
}

.tickets-chat-text p {
  margin: 0;
  color: #12213a;
  line-height: 1.5;
  font-size: 16px;
  font-weight: 600;
}

.tickets-chat-text strong {
  font-weight: 800;
}

.tickets-chat-text ul,
.tickets-chat-text ol {
  margin: 0;
  padding-left: 20px;
  color: #12213a;
  line-height: 1.5;
  font-size: 16px;
  font-weight: 600;
  display: grid;
  gap: 2px;
}

.tickets-chat-message.is-customer .tickets-chat-text p,
.tickets-chat-message.is-customer .tickets-chat-text ul,
.tickets-chat-message.is-customer .tickets-chat-text ol {
  color: #ffffff;
}

.tickets-chat-placeholder {
  padding: 10px 0;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 700;
}

.tickets-form-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
}

.tickets-form-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 14, 30, 0.5);
  backdrop-filter: blur(3px);
}

.tickets-form-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 760px);
  max-height: 88vh;
  overflow: auto;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(20, 35, 59, 0.16);
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(20, 35, 59, 0.2);
}

.tickets-form-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tickets-form-dialog-head h3 {
  margin: 0;
  color: var(--ink);
}

.tickets-form-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
}

.tickets-form-close svg {
  width: 16px;
  height: 16px;
}

.tickets-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tickets-form-grid label,
.tickets-form-note {
  display: grid;
  gap: 5px;
}

.tickets-form-note {
  margin-bottom: 12px;
}

.tickets-form-grid span,
.tickets-form-note span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.tickets-form-grid input,
.tickets-form-grid select,
.tickets-form-grid textarea,
.tickets-form-note textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(20, 35, 59, 0.14);
  background: #ffffff;
  color: var(--ink);
  font-size: 15px;
  padding: 10px 11px;
  resize: vertical;
}

.tickets-form-grid select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6.5L8 10.5L12 6.5' stroke='%2329394f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px 14px;
}

.tickets-form-grid select option {
  background: #ffffff;
  color: #1f2d44;
}

.tickets-page select {
  border-color: rgba(20, 35, 59, 0.16);
}

.tickets-page select:focus {
  outline: none;
  border-color: rgba(7, 53, 110, 0.38);
  box-shadow: 0 0 0 2px rgba(7, 53, 110, 0.12);
}

.tickets-form-grid label.tickets-form-checkbox {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  align-self: end;
  justify-self: start;
  gap: 8px;
  white-space: nowrap;
  min-height: 42px;
}

.tickets-form-checkbox input {
  display: block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.tickets-form-checkbox span {
  font-size: 14px;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
}

.tickets-form-span-2 {
  grid-column: span 2;
}

.tickets-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tickets-form-error {
  margin: 0 auto 0 0;
  color: #a32a2a;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-loading-indicator {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  text-align: center;
}

.dashboard-loading-indicator p {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

.dashboard-loading-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(7, 53, 110, 0.16);
  border-top-color: var(--navy);
  animation: dashboard-spin 0.8s linear infinite;
}

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

.dashboard-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 15, 32, 0.62);
  backdrop-filter: blur(6px);
}

.dashboard-lock-overlay-card {
  width: min(92vw, 560px);
  padding: clamp(22px, 3.6vw, 34px);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(16, 36, 69, 0.98), rgba(10, 25, 50, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.38);
}

.dashboard-lock-overlay-card h3 {
  margin: 0;
  font-size: clamp(24px, 3.2vw, 34px);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.dashboard-lock-overlay-card p {
  margin: 14px 0 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.apps-page-shell {
  display: grid;
  gap: 22px;
  align-content: start;
}

.apps-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.apps-segmented {
  display: inline-flex;
  padding: 6px;
  border-radius: 999px;
  background: rgba(20, 35, 59, 0.06);
  border: 1px solid rgba(20, 35, 59, 0.08);
}

.apps-segmented-button {
  min-width: 88px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
}

.apps-segmented-button.is-active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 6px 18px rgba(20, 35, 59, 0.1);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.app-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 35, 59, 0.08);
}

.app-card-top,
.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(7, 53, 110, 0.08);
  color: var(--navy);
}

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

.app-state {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 35, 59, 0.06);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-state.is-enabled {
  background: rgba(17, 117, 72, 0.12);
  color: #117548;
}

.app-card-copy h3 {
  margin: 0;
}

.app-card-copy p {
  margin: 10px 0 0;
  line-height: 1.7;
}

.app-docs-link {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.app-docs-link:hover {
  text-decoration: underline;
}

.app-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.app-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.app-switch-track {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 999px;
  background: rgba(20, 35, 59, 0.12);
}

.app-switch-track::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 35, 59, 0.18);
  transition: transform 0.2s ease;
}

.app-switch input:checked + .app-switch-track {
  background: rgba(17, 117, 72, 0.24);
}

.app-switch input:checked + .app-switch-track::after {
  transform: translateX(22px);
}

.users-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.surface-subcard {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(20, 35, 59, 0.08);
}

.hero-card,
.surface-card {
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(280px, 0.8fr);
  gap: 18px;
}

.hero-card h3,
.surface-card h3 {
  margin: 0;
  font-size: 24px;
}

.hero-card p,
.surface-card p,
.metric-card span,
.list-row small,
.empty-note,
.settings-note {
  color: var(--ink-soft);
}

.hero-card p {
  margin: 10px 0 0;
  max-width: 54ch;
  line-height: 1.7;
}

.hero-stat-grid,
.metric-grid {
  display: grid;
  gap: 14px;
}

.hero-stat-grid {
  grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 35, 59, 0.08);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  letter-spacing: -0.04em;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.surface-card {
  padding: 24px;
}

.surface-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(7, 53, 110, 0.08);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.list-block {
  display: grid;
  gap: 12px;
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid rgba(20, 35, 59, 0.08);
}

.list-row:first-child {
  border-top: none;
  padding-top: 0;
}

.list-row strong,
.list-row small,
.module-card strong,
.module-card small {
  display: block;
}

.queue-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.queue-pill {
  background: rgba(241, 169, 59, 0.18);
  color: #9a6309;
}

.status-pill {
  background: rgba(7, 53, 110, 0.08);
  color: var(--navy);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.module-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 35, 59, 0.08);
}

.module-card svg {
  width: 24px;
  height: 24px;
  color: var(--navy);
}

.module-card strong {
  margin-top: 18px;
  margin-bottom: 8px;
  font-size: 20px;
}

.module-card small {
  line-height: 1.65;
}

.empty-note,
.settings-note {
  margin: 8px 0 0;
  line-height: 1.65;
}

@media (max-width: 1080px) {
  .hero-card,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .login-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .login-card {
    width: min(100%, 620px);
    margin: 0 auto;
  }

  .login-panel {
    display: none;
  }

  .operations-tree {
    inset: 18px;
  }

  .operations-tree-stage {
    width: min(90%, 560px);
  }

  .tickets-page {
    grid-template-columns: 1fr;
  }

  .tickets-sidebar-panel {
    border-right: none;
    border-bottom: 1px solid rgba(20, 35, 59, 0.12);
  }

  .tickets-detail-grid {
    grid-template-columns: 1fr;
  }

  .tickets-detail-info {
    border-right: none;
    border-bottom: 1px solid rgba(20, 35, 59, 0.1);
  }

  .tickets-detail-row-three {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .tickets-detail-row-contact {
    grid-template-columns: 1fr;
  }

  .tickets-email-button {
    width: fit-content;
  }

  .tickets-detail-footer {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .tickets-table-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tickets-filter-actions {
    justify-self: start;
  }

  .tickets-filter-create {
    justify-self: start;
  }

  .tickets-table-pagination {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .tickets-main-panel {
    padding: 16px;
  }

  .tickets-sidebar-panel {
    padding: 16px;
  }

  .tickets-kpi-grid {
    grid-template-columns: 1fr;
  }

  .tickets-table-controls {
    grid-template-columns: 1fr;
  }

  .tickets-filter-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .tickets-filter-button {
    min-width: 90px;
  }

  .tickets-filter-create {
    width: 100%;
  }

  .tickets-pagination-inner {
    width: 100%;
    justify-content: space-between;
  }

  .tickets-form-grid {
    grid-template-columns: 1fr;
  }

  .tickets-form-span-2 {
    grid-column: span 1;
  }

  .tickets-detail-shell {
    border: 1px solid rgba(20, 35, 59, 0.1);
  }

  .tickets-detail-top,
  .tickets-detail-info,
  .tickets-detail-chat {
    padding: 12px;
  }

  .tickets-chat-message {
    width: fit-content;
    max-width: 88%;
  }

  .tickets-detail-row-three {
    grid-template-columns: 1fr;
  }

  .tickets-assign-control,
  .tickets-ticket-actions {
    width: 100%;
  }

  .tickets-assign-current {
    min-width: 0;
    width: 100%;
  }

  .tickets-ticket-actions {
    justify-content: space-between;
  }

  .portal-view {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    grid-template-columns: 1fr;
    padding: 14px 18px;
  }

  .portal-sidebar-top,
  .portal-sidebar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .portal-nav {
    display: flex;
    flex-wrap: wrap;
  }

  .portal-main {
    min-height: auto;
  }

  .portal-header {
    flex-direction: column;
    align-items: flex-start;
    min-height: auto;
    padding: 14px 18px;
  }

  .apps-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  .login-card,
  .login-panel {
    padding: 28px 20px;
  }

  .login-view {
    height: 100dvh;
  }

  .login-card {
    grid-template-rows: auto auto;
    align-content: center;
    gap: 12px;
    padding: 16px 18px 20px;
  }

  .login-brand {
    margin-top: 0;
  }

  .login-copy h1 {
    font-size: clamp(20px, 5.6vw, 32px);
  }

  .login-form {
    max-width: 100%;
  }

  .operations-tree {
    inset: 12px;
  }

  .operations-tree-stage {
    width: min(94%, 420px);
  }

  .tree-core {
    width: 86px;
    height: 86px;
  }

  .tree-node {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }

  .tree-node svg {
    width: 18px;
    height: 18px;
  }

  .tree-node-depth-2 {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .tree-node-depth-2 svg {
    width: 14px;
    height: 14px;
  }

  .tree-node-depth-3 {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .tree-node-depth-4 {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

}
