@layer reset, base, layout, components, responsive;
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body,
  h1,
  h2,
  h3,
  p {
    margin: 0;
  }
  button,
  input,
  textarea,
  select {
    font: inherit;
  }
  button {
    cursor: pointer;
  }
  button,
  a,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color: transparent;
  }
  button {
    color: inherit;
  }
  a {
    color: inherit;
  }
  svg {
    display: block;
  }
  [hidden] {
    display: none !important;
  }
}
@layer base {
  :root {
    color-scheme: dark;
    --bg: #141715;
    --sidebar: #191c19;
    --surface: #1c201d;
    --raised: #242923;
    --hover: #272d25;
    --text: #f0f2e9;
    --muted: #a3aa9f;
    --faint: #737d70;
    --line: #30372e;
    --accent: #d2f878;
    --accent-ink: #19230d;
    --accent-soft: #303e20;
    --danger: #ffb1a2;
    --danger-bg: #392823;
    --blue: #add0f1;
    --blue-bg: #243340;
    --amber: #efce88;
    --amber-bg: #393323;
    --radius: 12px;
    --shadow: 0 24px 100px #0005;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
  }
  :root[data-theme="light"] {
    color-scheme: light;
    --bg: #f7f8f3;
    --sidebar: #eef0e9;
    --surface: #fff;
    --raised: #f0f2eb;
    --hover: #e7eadf;
    --text: #20271d;
    --muted: #5c6756;
    --faint: #737d6c;
    --line: #dce1d4;
    --accent: #d2ef8a;
    --accent-ink: #263511;
    --accent-soft: #e7f1d3;
    --danger: #a13d30;
    --danger-bg: #fbeae5;
    --blue: #315e88;
    --blue-bg: #e8f0f7;
    --amber: #876117;
    --amber-bg: #f8efd9;
    --shadow: 0 24px 100px #25321a22;
  }
  body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
  }
  ::selection {
    background: var(--accent);
    color: var(--accent-ink);
  }
  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
  }
  [data-theme="light"] :focus-visible {
    outline-color: #59752d;
  }
  button {
    border: 0;
    background: none;
  }
  button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
  }
  input,
  textarea,
  select {
    border: 1px solid var(--line);
    background: var(--bg);
    color: var(--text);
    border-radius: 8px;
    padding: 11px 12px;
    min-height: 44px;
    max-width: 100%;
  }
  textarea {
    resize: vertical;
    min-height: 110px;
  }
  select {
    cursor: pointer;
  }
  input::placeholder,
  textarea::placeholder {
    color: var(--faint);
  }
  input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    accent-color: #829c47;
    cursor: pointer;
    margin: 0;
  }
  h1,
  h2,
  h3 {
    font-weight: 550;
    letter-spacing: -0.04em;
  }
  h1 {
    font-size: clamp(28px, 2.8vw, 39px);
    line-height: 1.18;
  }
  h2 {
    font-size: 20px;
  }
  h3 {
    font-size: 15px;
    letter-spacing: -0.01em;
  }
  .icon {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
  }
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .muted {
    color: var(--muted);
  }
  .eyebrow {
    font-size: 10px;
    letter-spacing: 0.15em;
    font-weight: 650;
    text-transform: uppercase;
    color: var(--muted);
  }
  .mono {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
    letter-spacing: 0.015em;
    font-variant-numeric: tabular-nums;
  }
  .skip {
    position: fixed;
    z-index: 100;
    top: -100px;
    left: 20px;
    background: var(--accent);
    color: var(--accent-ink);
    padding: 12px;
  }
  .skip:focus {
    top: 12px;
  }
}
@layer layout {
  .shell {
    display: grid;
    grid-template-columns: 222px minmax(0, 1fr);
    min-height: 100svh;
  }
  .sidebar {
    background: var(--sidebar);
    border-right: 1px solid var(--line);
    position: sticky;
    top: 0;
    height: 100svh;
    display: flex;
    flex-direction: column;
    padding: 30px 17px 20px;
    z-index: 25;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 10px 32px;
    text-decoration: none;
  }
  .logo-mark {
    width: 33px;
    height: 33px;
    color: var(--accent);
    flex-shrink: 0;
  }
  .mobile-brand {
    display: none;
  }
  .brand-word {
    font-size: 25px;
    letter-spacing: -1px;
    font-weight: 650;
    line-height: 1;
  }
  .brand-word span {
    font-weight: 350;
    color: var(--muted);
  }
  .workspace-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 9px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
  }
  .workspace-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    background: var(--raised);
    border-radius: 7px;
  }
  .workspace-badge small {
    display: block;
    color: var(--muted);
    font-size: 10px;
  }
  .workspace-badge > .icon {
    margin-left: auto;
    width: 14px;
  }
  .nav-group {
    display: grid;
    gap: 4px;
  }
  .nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 10px 13px;
    border-radius: 7px;
    text-align: left;
    color: var(--muted);
    font-size: 12px;
  }
  .nav-item .icon {
    width: 17px;
    height: 17px;
  }
  .nav-item:hover {
    background: var(--hover);
    color: var(--text);
  }
  .nav-item.active {
    background: var(--accent-soft);
    color: var(--text);
  }
  .nav-item.active > .icon {
    color: var(--accent);
  }
  [data-theme="light"] .nav-item.active > .icon {
    color: #59752d;
  }
  .nav-item .nav-count {
    margin-left: auto;
    font-family: Consolas, monospace;
    font-size: 11px;
    color: var(--muted);
  }
  .nav-label {
    padding: 30px 13px 12px;
    font-size: 9px;
    color: var(--faint);
    letter-spacing: 0.15em;
  }
  .queue-dot {
    width: 6px;
    height: 6px;
    background: var(--faint);
    border-radius: 50%;
    margin: 0 5px;
  }
  .queue-dot.urgent {
    background: var(--danger);
  }
  .queue-dot.soon {
    background: var(--amber);
  }
  .queue-dot.resolved {
    background: var(--accent);
  }
  .sidebar-bottom {
    margin-top: auto;
    padding-top: 30px;
  }
  .demo-box {
    margin: 0 7px 19px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }
  .demo-box p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 7px;
  }
  .live-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    margin-right: 5px;
  }
  .user-profile {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 7px;
  }
  .avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--raised);
    border: 1px solid var(--line);
    display: inline-grid;
    place-items: center;
    font-size: 10px;
    flex-shrink: 0;
    color: var(--muted);
  }
  .user-profile strong {
    font-size: 12px;
    font-weight: 550;
  }
  .user-profile small {
    display: block;
    font-size: 10px;
    color: var(--muted);
  }
  .main {
    min-width: 0;
  }
  .topbar {
    height: 73px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    gap: 16px;
  }
  .breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--muted);
  }
  .breadcrumb .icon {
    width: 12px;
    color: var(--faint);
  }
  .breadcrumb strong {
    font-weight: 500;
    color: var(--text);
  }
  .top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .top-actions .divider {
    height: 20px;
    width: 1px;
    background: var(--line);
    margin: 0 5px;
  }
  .language-switch {
    display: flex;
    gap: 1px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 7px;
  }
  .language-switch button {
    font-size: 10px;
    min-height: 29px;
    min-width: 33px;
    border-radius: 4px;
    color: var(--muted);
  }
  .language-switch button[aria-pressed="true"] {
    background: var(--raised);
    color: var(--text);
  }
  .content {
    padding: 32px 34px 24px;
    max-width: 1800px;
    margin: 0 auto;
  }
  .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
  }
  .page-heading .eyebrow {
    margin-bottom: 12px;
  }
  .page-heading p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
  }
  .heading-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
  }
  .stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 24px 0;
    margin-bottom: 30px;
  }
  .stat {
    border-right: 1px solid var(--line);
    padding: 0 24px;
  }
  .stat:first-child {
    padding-left: 0;
  }
  .stat:last-child {
    border: 0;
  }
  .stat-label {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
  }
  .stat-label .icon {
    width: 14px;
    height: 14px;
  }
  .stat-number {
    font-size: 43px;
    font-weight: 450;
    letter-spacing: -2px;
    line-height: 1.4;
    font-variant-numeric: tabular-nums;
  }
  .stat-foot {
    font-size: 10px;
    color: var(--faint);
  }
  .stat-alert .stat-number {
    color: var(--danger);
  }
  .stat-done .stat-number {
    color: var(--accent);
  }
  [data-theme="light"] .stat-done .stat-number {
    color: #536f22;
  }
  .work-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 244px;
    gap: 27px;
  }
  .work-grid.no-radar {
    grid-template-columns: minmax(0, 1fr);
  }
  .queue-panel {
    min-width: 0;
  }
  .queue-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 18px;
  }
  .queue-heading h2 {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .count-chip {
    font-size: 10px;
    letter-spacing: 0;
    font-weight: 400;
    background: var(--raised);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--muted);
  }
  .toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }
  .search-field {
    position: relative;
    flex: 1;
    min-width: 170px;
  }
  .search-field > .icon {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 16px;
    height: 16px;
    color: var(--muted);
  }
  .search-field input {
    width: 100%;
    padding-left: 36px;
    padding-right: 27px;
    min-height: 40px;
    font-size: 11px;
  }
  .search-field kbd {
    position: absolute;
    right: 11px;
    top: 10px;
    color: var(--faint);
    border: 1px solid var(--line);
    padding: 0 4px;
    font-size: 10px;
  }
  .filters-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 15px 0 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 15px;
  }
  .filters-panel label {
    display: grid;
    gap: 5px;
    font-size: 10px;
    color: var(--muted);
  }
  .filters-panel select {
    font-size: 11px;
    width: 100%;
    padding: 8px;
    min-height: 36px;
  }
  .queue-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
    overflow: auto;
  }
  .queue-tabs button {
    font-size: 11px;
    white-space: nowrap;
    min-height: 43px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    padding: 0 0 11px;
  }
  .queue-tabs button.active {
    color: var(--text);
    border-color: var(--accent);
  }
  .queue-tabs button span {
    margin-left: 5px;
    font-size: 10px;
    color: var(--faint);
  }
  .table-head,
  .ticket-row {
    display: grid;
    grid-template-columns: 20px minmax(150px, 1fr) 102px 65px 76px;
    gap: 12px;
    align-items: center;
  }
  .table-head {
    padding: 13px 10px;
    font-size: 9px;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--sidebar);
  }
  .ticket-row {
    padding: 15px 10px;
    border-bottom: 1px solid var(--line);
    min-height: 77px;
    position: relative;
    transition: background 0.15s;
  }
  .ticket-row:hover {
    background: var(--hover);
  }
  .ticket-row.selected {
    background: var(--accent-soft);
  }
  .ticket-main {
    min-width: 0;
    display: block;
    text-align: left;
    padding: 0;
  }
  .ticket-main strong {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.4;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    margin-bottom: 6px;
  }
  .ticket-main:hover strong {
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .ticket-meta {
    font-size: 10px;
    color: var(--faint);
    display: flex;
    gap: 9px;
    align-items: center;
    min-width: 0;
  }
  .ticket-meta .mono {
    font-size: 10px;
  }
  .ticket-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ticket-priority {
    font-size: 10px;
    display: flex;
    gap: 5px;
    align-items: center;
    color: var(--muted);
  }
  .priority-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    width: 13px;
    height: 12px;
  }
  .priority-bars i {
    width: 3px;
    background: var(--faint);
    opacity: 0.3;
  }
  .priority-bars i:nth-child(1) {
    height: 4px;
  }
  .priority-bars i:nth-child(2) {
    height: 7px;
  }
  .priority-bars i:nth-child(3) {
    height: 10px;
  }
  .priority-bars[data-level="low"] i:nth-child(1),
  .priority-bars[data-level="normal"] i:nth-child(-n + 2),
  .priority-bars[data-level="high"] i,
  .priority-bars[data-level="urgent"] i {
    opacity: 1;
  }
  .ticket-priority.urgent {
    color: var(--danger);
  }
  .ticket-priority.urgent i {
    background: var(--danger);
  }
  .ticket-end {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
  }
  .ticket-end .avatar {
    width: 25px;
    height: 25px;
    font-size: 8px;
  }
  .due-mini {
    color: var(--faint);
    font-size: 9px;
    white-space: nowrap;
  }
  .due-mini.overdue {
    color: var(--danger);
  }
  .due-mini.soon {
    color: var(--amber);
  }
  .status {
    display: inline-flex;
    gap: 5px;
    align-items: center;
    font-size: 9px;
    line-height: 1.3;
    padding: 4px 6px;
    border-radius: 4px;
    background: var(--raised);
    color: var(--muted);
    width: max-content;
    max-width: 100%;
  }
  .status::before {
    content: "";
    width: 5px;
    height: 5px;
    border: 1px solid currentColor;
    border-radius: 50%;
    flex-shrink: 0;
  }
  .status.progress {
    background: var(--blue-bg);
    color: var(--blue);
  }
  .status.progress::before {
    background: currentColor;
  }
  .status.waiting {
    background: var(--amber-bg);
    color: var(--amber);
  }
  .status.resolved,
  .status.closed {
    background: var(--accent-soft);
    color: var(--accent);
  }
  [data-theme="light"] .status.resolved,
  [data-theme="light"] .status.closed {
    color: #4c691f;
  }
  .table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    color: var(--faint);
    gap: 10px;
    padding: 18px 0;
  }
  .pagination {
    display: flex;
    gap: 7px;
    align-items: center;
  }
  .pagination .icon-button {
    width: 29px;
    min-height: 29px;
  }
  .pagination .prev {
    transform: rotate(180deg);
  }
  .radar {
    border-left: 1px solid var(--line);
    padding-left: 24px;
  }
  .radar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 3px 0 5px;
  }
  .radar-heading h3 {
    font-size: 13px;
  }
  .radar > p {
    font-size: 10px;
    color: var(--muted);
  }
  .radar-visual {
    height: 135px;
    display: grid;
    place-items: center;
    position: relative;
    margin: 8px 0 12px;
    overflow: hidden;
  }
  .radar-visual svg {
    width: 142px;
    height: 142px;
    color: var(--line);
  }
  .radar-visual .radar-count {
    position: absolute;
    text-align: center;
    top: 38px;
  }
  .radar-count strong {
    font-size: 32px;
    font-weight: 450;
    display: block;
    line-height: 1.2;
  }
  .radar-count small {
    font-size: 9px;
    color: var(--muted);
  }
  .radar-ring {
    stroke: var(--accent);
    transform: rotate(-90deg);
    transform-origin: center;
  }
  .alert-item {
    padding: 15px 0;
    border-top: 1px solid var(--line);
    display: block;
    width: 100%;
    text-align: left;
  }
  .alert-item .alert-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
  }
  .alert-item strong {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    display: block;
  }
  .alert-item .alert-bottom {
    color: var(--muted);
    font-size: 9px;
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  .alert-item .alert-bottom .icon {
    width: 11px;
    height: 11px;
  }
  .alert-item:hover strong {
    color: var(--accent);
  }
  [data-theme="light"] .alert-item:hover strong {
    color: #547629;
  }
  .radar .text-button {
    font-size: 10px;
    margin-top: 12px;
    padding: 10px 0;
  }
  .sync-footer {
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 23px;
    padding-top: 16px;
    font-size: 9px;
    color: var(--faint);
  }
  .board-scroll {
    overflow-x: auto;
    padding-bottom: 14px;
    min-width: 0;
  }
  .board {
    display: grid;
    grid-template-columns: repeat(5, minmax(204px, 1fr));
    gap: 12px;
    padding-top: 17px;
  }
  .board-column {
    min-height: 290px;
    padding: 0 6px 8px;
    background: var(--sidebar);
    border-radius: 8px;
  }
  .column-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 7px;
    font-size: 10px;
    color: var(--muted);
  }
  .column-title > span {
    font-size: 10px;
  }
  .ticket-card {
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    position: relative;
    margin-bottom: 9px;
  }
  .ticket-card:hover {
    border-color: var(--faint);
  }
  .card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 13px;
  }
  .card-top .mono {
    color: var(--faint);
  }
  .card-top .ticket-priority {
    margin-left: auto;
  }
  .ticket-card .ticket-main strong {
    white-space: normal;
    font-size: 12px;
    margin-bottom: 13px;
  }
  .ticket-card .ticket-meta {
    display: none;
  }
  .card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    margin-top: 12px;
  }
  .card-category {
    font-size: 9px;
    color: var(--muted);
  }
  .column-empty {
    padding: 25px 10px;
    font-size: 11px;
    color: var(--faint);
    text-align: center;
  }
  .bulk-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 13px;
    background: var(--accent-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 10px 0;
    font-size: 11px;
  }
  .analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .chart-section {
    padding: 23px 0;
    border-top: 1px solid var(--line);
    min-width: 0;
  }
  .chart-section.wide {
    grid-column: 1/-1;
  }
  .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 16px;
  }
  .chart-header p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
  }
  .chart-legend {
    display: flex;
    gap: 16px;
    font-size: 10px;
    color: var(--muted);
  }
  .chart-legend span::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    background: var(--accent);
    border-radius: 2px;
  }
  .chart-legend span:last-child::before {
    background: var(--faint);
  }
  .trend-chart {
    height: 235px;
    display: flex;
    align-items: stretch;
    gap: clamp(2px, 1.4vw, 20px);
    margin-top: 24px;
    padding: 0 0 23px;
    border-bottom: 1px solid var(--line);
    background: repeating-linear-gradient(
      to top,
      transparent 0,
      transparent 52px,
      var(--line) 53px,
      transparent 54px
    );
  }
  .trend-day {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
  }
  .trend-bar {
    width: min(28px, 40%);
    height: var(--height);
    min-height: 2px;
    transform-origin: bottom;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
  }
  .trend-bar.secondary {
    background: var(--faint);
  }
  .trend-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--muted);
    white-space: nowrap;
  }
  .chart-data {
    margin-top: 20px;
    font-size: 11px;
    color: var(--muted);
  }
  .chart-data summary {
    cursor: pointer;
  }
  .chart-data table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 12px;
  }
  .chart-data td,
  .chart-data th {
    text-align: left;
    padding: 7px;
    border-bottom: 1px solid var(--line);
  }
  .bar-list {
    display: grid;
    gap: 23px;
    margin-top: 27px;
  }
  .bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 9px;
  }
  .bar-track {
    height: 7px;
    border-radius: 4px;
    background: var(--raised);
    overflow: hidden;
  }
  .bar-fill {
    height: 100%;
    width: var(--width);
    background: var(--accent);
    transform-origin: left;
    border-radius: 4px;
  }
  .category-chart .bar-fill {
    background: var(--faint);
  }
  .guide-layout {
    max-width: 1000px;
  }
  .guide-step {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 30px;
    border-top: 1px solid var(--line);
    padding: 30px 0;
  }
  .guide-step h2 {
    font-size: 19px;
    letter-spacing: -0.03em;
  }
  .guide-step p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
  }
  .shortcut-list {
    display: grid;
    gap: 14px;
  }
  .shortcut-list div {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    color: var(--muted);
    font-size: 13px;
  }
  kbd {
    font-family: Consolas, monospace;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 3px 8px;
    color: var(--text);
    font-size: 11px;
  }
}
@layer components {
  .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    font-size: 11px;
    font-weight: 550;
    border: 1px solid var(--line);
    border-radius: 7px;
    white-space: nowrap;
    line-height: 1.2;
    position: relative;
    overflow: hidden;
  }
  .button:hover {
    background: var(--hover);
  }
  .button.primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: transparent;
  }
  .button.primary:hover {
    filter: brightness(1.05);
  }
  .button .icon {
    width: 15px;
    height: 15px;
  }
  .button.small {
    padding: 7px 10px;
    min-height: 33px;
    font-size: 10px;
  }
  .button.is-on {
    background: var(--accent-soft);
  }
  .icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    min-height: 36px;
    border-radius: 7px;
    position: relative;
    flex-shrink: 0;
  }
  .icon-button:hover {
    background: var(--hover);
  }
  .icon-button .icon {
    width: 17px;
    height: 17px;
  }
  .alert-dot {
    position: absolute;
    right: 6px;
    top: 5px;
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
  }
  .text-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    color: var(--muted);
    padding: 8px;
  }
  .text-button:hover {
    color: var(--text);
  }
  .segmented {
    display: flex;
    gap: 2px;
    border: 1px solid var(--line);
    padding: 3px;
    border-radius: 7px;
  }
  .segmented button {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 29px;
    font-size: 10px;
    padding: 5px 9px;
    border-radius: 4px;
    color: var(--muted);
  }
  .segmented .icon {
    width: 13px;
    height: 13px;
  }
  .segmented button.active {
    background: var(--raised);
    color: var(--text);
  }
  .period-select {
    font-size: 10px;
    min-height: 34px;
    padding: 8px;
    max-width: 170px;
    background: transparent;
  }
  .empty {
    padding: 65px 20px;
    text-align: center;
    border-bottom: 1px solid var(--line);
  }
  .empty > .icon {
    margin: 0 auto 15px;
    width: 28px;
    height: 28px;
    color: var(--faint);
  }
  .empty h3 {
    font-size: 18px;
  }
  .empty p {
    font-size: 12px;
    color: var(--muted);
    margin: 10px auto 20px;
    max-width: 350px;
  }
  .loading-lines {
    padding: 28px 0;
  }
  .loading-line {
    height: 50px;
    margin-bottom: 17px;
    border-radius: 6px;
    background: var(--raised);
    max-width: 100%;
  }
  .loading-line:nth-child(2) {
    max-width: 83%;
  }
  .loading-line:nth-child(3) {
    max-width: 91%;
  }
  .error-text {
    color: var(--danger);
    font-size: 11px;
    display: block;
    min-height: 0;
  }
  .field-error {
    margin-top: 2px;
    min-height: 0;
  }
  .field:has([aria-invalid="true"]) input,
  .field:has([aria-invalid="true"]) textarea,
  .field:has([aria-invalid="true"]) select {
    border-color: var(--danger);
  }
  dialog {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    padding: 0;
    border-radius: 15px;
    box-shadow: var(--shadow);
    max-height: 94svh;
    width: min(700px, calc(100% - 32px));
    max-width: calc(100% - 24px);
    overscroll-behavior: contain;
  }
  dialog::backdrop {
    background: #070c08a8;
    backdrop-filter: blur(4px);
  }
  body:has(dialog[open]) {
    overflow: hidden;
  }
  dialog.drawer {
    width: min(590px, 100%);
    max-width: 100%;
    height: 100svh;
    max-height: 100svh;
    margin: 0 0 0 auto;
    border-radius: 0;
    border-top: 0;
    border-bottom: 0;
    border-right: 0;
  }
  .dialog-head {
    padding: 25px 27px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
  }
  .dialog-head h2 {
    font-size: 23px;
    line-height: 1.35;
    margin-top: 5px;
  }
  .dialog-head p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 8px;
  }
  .dialog-body {
    padding: 25px 27px;
  }
  .dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    border-top: 1px solid var(--line);
    padding: 18px 27px;
    background: var(--surface);
    position: sticky;
    bottom: 0;
    z-index: 2;
  }
  .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }
  .field {
    display: grid;
    gap: 6px;
    font-size: 11px;
    color: var(--muted);
    align-content: start;
  }
  .field.full {
    grid-column: 1/-1;
  }
  .field input,
  .field select,
  .field textarea {
    font-size: 12px;
    width: 100%;
  }
  .field small {
    font-size: 10px;
    color: var(--faint);
  }
  .form-banner {
    margin-bottom: 14px;
  }
  .details-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 24px;
    margin: 23px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
  }
  .details-meta dt {
    font-size: 10px;
    color: var(--faint);
    margin-bottom: 6px;
  }
  .details-meta dd {
    margin: 0;
    font-size: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
  }
  .detail-description {
    font-size: 13px;
    line-height: 1.9;
    color: var(--muted);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  .tag-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 15px;
  }
  .tag {
    font-size: 10px;
    color: var(--muted);
    background: var(--raised);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 3px 7px;
  }
  .detail-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 22px 0;
  }
  .notes-form {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 24px 0;
    margin: 24px 0;
  }
  .notes-form textarea {
    font-size: 12px;
    min-height: 100px;
    width: 100%;
    margin: 12px 0 5px;
  }
  .note-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
  }
  .note-form-footer p {
    font-size: 10px;
    color: var(--faint);
    max-width: 240px;
  }
  .timeline {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
  }
  .timeline li {
    position: relative;
    padding: 0 0 24px 23px;
    border-left: 1px solid var(--line);
    margin-left: 5px;
  }
  .timeline li::before {
    content: "";
    position: absolute;
    left: -4px;
    top: 6px;
    background: var(--faint);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 2px solid var(--surface);
  }
  .timeline li:last-child {
    border-color: transparent;
  }
  .timeline-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  .timeline-top strong {
    font-size: 11px;
    font-weight: 500;
  }
  .timeline time {
    font-size: 9px;
    color: var(--faint);
  }
  .timeline p {
    margin-top: 8px;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    color: var(--muted);
  }
  .history-change {
    font-size: 10px;
    color: var(--muted);
    margin-top: 6px;
    overflow-wrap: anywhere;
  }
  .history-change del {
    color: var(--faint);
  }
  .note-mark {
    background: var(--accent-soft);
    color: var(--text);
    border-radius: 4px;
    padding: 3px 6px;
    font-size: 9px;
  }
  .confirm-body {
    padding: 28px;
  }
  .confirm-body h2 {
    margin-bottom: 12px;
  }
  .confirm-body p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
  }
  #confirm-dialog {
    width: min(430px, calc(100% - 30px));
  }
  .toasts {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    max-width: calc(100% - 30px);
    width: max-content;
  }
  .toast {
    background: var(--text);
    color: var(--bg);
    box-shadow: var(--shadow);
    border-radius: 10px;
    padding: 14px 17px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    max-width: 570px;
  }
  .toast .icon {
    width: 19px;
    height: 19px;
  }
  .toast button {
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
  }
  .toast small {
    display: block;
    font-size: 9px;
    opacity: 0.75;
  }
  .mobile-menu,
  .nav-backdrop {
    display: none;
  }
  .mobile-close {
    display: none;
  }
  .busy {
    cursor: progress;
  }
}
@layer responsive {
  :root {
    --faint: #929c8c;
  }
  :root[data-theme="light"] {
    --faint: #636f5d;
  }
  .nav-item {
    font-size: 13px;
  }
  .stat-label {
    font-size: 12px;
  }
  .stat-foot {
    font-size: 11px;
  }
  .ticket-main strong {
    font-size: 13px;
  }
  .table-head {
    font-size: 10px;
  }
  .status {
    font-size: 10px;
  }
  .ticket-meta,
  .ticket-meta .mono {
    font-size: 11px;
  }
  .button {
    font-size: 12px;
  }
  .search-field input {
    font-size: 12px;
  }
  .queue-tabs button {
    font-size: 12px;
  }
  .radar-heading h3 {
    font-size: 14px;
  }
  .alert-item strong {
    font-size: 12px;
  }
  .alert-item .alert-bottom {
    font-size: 10px;
  }
  .ticket-priority {
    font-size: 11px;
  }
  @media (min-width: 1600px) {
    .content {
      padding: 40px 50px;
    }
    .table-head,
    .ticket-row {
      grid-template-columns: 22px minmax(180px, 1fr) 125px 90px 115px;
      gap: 18px;
    }
    .ticket-main strong {
      font-size: 13px;
    }
    .status {
      font-size: 10px;
    }
    .ticket-end .avatar {
      width: 29px;
      height: 29px;
    }
    .work-grid {
      grid-template-columns: minmax(0, 1fr) 275px;
      gap: 35px;
    }
  }
  @media (max-width: 1200px) {
    .shell {
      grid-template-columns: 192px minmax(0, 1fr);
    }
    .sidebar {
      padding: 25px 12px 17px;
    }
    .brand {
      padding-left: 7px;
    }
    .brand-word {
      font-size: 23px;
    }
    .content {
      padding: 27px 24px 20px;
    }
    .topbar {
      padding: 0 24px;
    }
    .work-grid {
      grid-template-columns: minmax(0, 1fr);
    }
    .radar {
      display: none;
    }
    .stat {
      padding: 0 18px;
    }
    .stat-foot {
      font-size: 9px;
    }
    .page-heading .button {
      padding: 10px 12px;
    }
    .table-head,
    .ticket-row {
      grid-template-columns: 20px minmax(160px, 1fr) 115px 80px 110px;
    }
  }
  @media (max-width: 900px) {
    .shell {
      grid-template-columns: 175px minmax(0, 1fr);
    }
    .sidebar {
      padding: 22px 10px 15px;
    }
    .workspace-badge {
      margin-bottom: 16px;
    }
    .brand-word {
      font-size: 21px;
    }
    .logo-mark {
      width: 29px;
      height: 29px;
    }
    .nav-item {
      padding: 9px;
      font-size: 11px;
      gap: 8px;
    }
    .nav-label {
      padding: 23px 9px 9px;
    }
    .breadcrumb > span {
      display: none;
    }
    .breadcrumb > .icon {
      display: none;
    }
    .content {
      padding: 24px 20px;
    }
    .page-heading {
      align-items: start;
    }
    .page-heading p {
      max-width: 260px;
      line-height: 1.7;
    }
    .heading-actions {
      flex-direction: column;
      align-items: end;
      gap: 8px;
    }
    .stat {
      padding: 0 12px;
    }
    .stat-label {
      font-size: 10px;
      gap: 5px;
    }
    .stat-number {
      font-size: 37px;
    }
    .stat-foot {
      display: none;
    }
    .table-head,
    .ticket-row {
      grid-template-columns: 18px minmax(120px, 1fr) 100px 62px;
      gap: 9px;
    }
    .ticket-end {
      display: none;
    }
    .table-head > span:last-child {
      display: none;
    }
    .ticket-main strong {
      font-size: 11px;
    }
    .toolbar .button span {
      display: none;
    }
    .queue-tabs {
      gap: 15px;
    }
    .analytics-grid {
      gap: 20px;
    }
    .guide-step {
      grid-template-columns: 1fr;
      gap: 15px;
    }
  }
  @media (max-width: 650px) {
    .shell {
      display: block;
    }
    .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      bottom: 0;
      width: 240px;
      height: 100dvh;
      transform: translateX(-100%);
      transition: transform 0.24s;
      z-index: 50;
      padding: 24px 18px;
    }
    .sidebar.open {
      transform: none;
    }
    .mobile-close {
      display: inline-grid;
      position: absolute;
      right: 7px;
      top: 22px;
    }
    .sidebar .brand {
      padding-bottom: 29px;
    }
    .sidebar .brand-word {
      font-size: 24px;
    }
    .nav-item {
      font-size: 13px;
      min-height: 45px;
    }
    .nav-label {
      padding-top: 28px;
    }
    .nav-backdrop.open {
      display: block;
      position: fixed;
      inset: 0;
      background: #0008;
      z-index: 45;
    }
    .mobile-menu {
      display: inline-grid;
    }
    .topbar {
      height: 62px;
      padding: 0 16px;
      gap: 8px;
    }
    .breadcrumb {
      gap: 8px;
      min-width: 0;
    }
    .breadcrumb strong {
      font-size: 10px;
    }
    .top-actions {
      gap: 3px;
    }
    .top-actions .divider {
      margin: 0 2px;
    }
    .top-actions .refresh-button {
      display: none;
    }
    .top-actions .icon-button {
      width: 31px;
    }
    .language-switch {
      padding: 2px;
    }
    .language-switch button {
      min-width: 28px;
    }
    .content {
      padding: 26px 18px 18px;
    }
    .page-heading {
      margin-bottom: 24px;
      gap: 13px;
      flex-wrap: wrap;
    }
    .page-heading .eyebrow {
      font-size: 9px;
      margin-bottom: 10px;
    }
    .page-heading p {
      max-width: none;
      font-size: 11px;
    }
    .page-heading h1 {
      font-size: 31px;
    }
    .heading-actions {
      flex-direction: row;
      align-items: center;
      width: 100%;
      justify-content: space-between;
    }
    .heading-actions > .button {
      order: -1;
    }
    .heading-actions .period-select {
      font-size: 10px;
    }
    .stats {
      grid-template-columns: repeat(2, 1fr);
      padding: 0;
      margin-bottom: 26px;
    }
    .stat {
      padding: 17px 0 17px 17px;
      border-bottom: 1px solid var(--line);
    }
    .stat:nth-child(odd) {
      padding-left: 0;
    }
    .stat:nth-child(even) {
      border-right: 0;
    }
    .stat:nth-child(3),
    .stat:nth-child(4) {
      border-bottom: 0;
    }
    .stat:first-child {
      padding-top: 17px;
    }
    .stat-label {
      font-size: 11px;
    }
    .stat-number {
      font-size: 36px;
      line-height: 1.35;
    }
    .stat-foot {
      display: block;
      font-size: 9px;
    }
    .queue-heading {
      gap: 8px;
      align-items: start;
    }
    .queue-heading h2 {
      font-size: 19px;
    }
    .queue-heading .focus-toggle {
      display: none;
    }
    .segmented button {
      font-size: 9px;
      padding: 5px 7px;
    }
    .segmented button .icon {
      width: 12px;
      height: 12px;
    }
    .toolbar {
      gap: 7px;
    }
    .search-field {
      flex-basis: 100%;
      min-width: 0;
    }
    .search-field input {
      font-size: 12px;
      min-height: 44px;
    }
    .search-field > .icon {
      top: 14px;
    }
    .search-field kbd {
      top: 12px;
    }
    .toolbar > .button {
      min-height: 36px;
    }
    .toolbar .button span {
      display: inline;
    }
    .toolbar .period-select {
      margin-left: auto;
      max-width: 150px;
    }
    .filters-panel {
      grid-template-columns: 1fr 1fr;
    }
    .queue-tabs {
      gap: 21px;
    }
    .queue-tabs button {
      font-size: 11px;
    }
    .table-head {
      display: none;
    }
    .ticket-row {
      grid-template-columns: 19px minmax(0, 1fr) 70px;
      gap: 9px;
      padding: 17px 0;
    }
    .ticket-main {
      grid-column: 2;
    }
    .ticket-main strong {
      font-size: 12px;
      white-space: normal;
      margin-bottom: 7px;
    }
    .ticket-row > .status {
      grid-column: 2;
      grid-row: 2;
      margin-top: -2px;
    }
    .ticket-row > .ticket-priority {
      grid-column: 3;
      grid-row: 1;
      justify-content: end;
      font-size: 10px;
    }
    .ticket-row > .ticket-end {
      display: flex;
      grid-column: 3;
      grid-row: 2;
      justify-content: end;
    }
    .ticket-row > .ticket-end .avatar {
      display: none;
    }
    .ticket-row > .ticket-end .due-mini {
      font-size: 9px;
    }
    .ticket-meta {
      font-size: 10px;
    }
    .ticket-row > input {
      grid-column: 1;
      grid-row: 1;
    }
    .table-footer {
      padding: 16px 0;
      align-items: center;
    }
    .board {
      grid-template-columns: repeat(5, 240px);
    }
    .sync-footer {
      font-size: 8px;
      margin-top: 17px;
    }
    .sync-footer > span:last-child {
      display: none;
    }
    .analytics-grid {
      grid-template-columns: 1fr;
      gap: 5px;
    }
    .chart-section.wide {
      grid-column: auto;
    }
    .chart-header {
      flex-wrap: wrap;
    }
    .trend-chart {
      height: 200px;
      gap: 9px;
    }
    .trend-label {
      font-size: 8px;
    }
    .guide-step {
      padding: 24px 0;
    }
    .guide-step h2 {
      font-size: 18px;
    }
    .guide-step p {
      font-size: 12px;
    }
    dialog {
      max-height: 94dvh;
      width: calc(100% - 20px);
      border-radius: 12px;
    }
    .dialog-head {
      padding: 22px 20px 17px;
    }
    .dialog-head h2 {
      font-size: 21px;
    }
    .dialog-body {
      padding: 22px 20px;
    }
    .dialog-actions {
      padding: 16px 20px;
    }
    .form-grid {
      grid-template-columns: 1fr;
      gap: 16px;
    }
    .field.full {
      grid-column: auto;
    }
    .field input,
    .field textarea,
    .field select {
      font-size: 16px;
    }
    .details-meta {
      gap: 19px 12px;
    }
    .details-meta dd {
      font-size: 11px;
      overflow-wrap: anywhere;
      display: block;
    }
    .note-form-footer {
      align-items: start;
      flex-direction: column;
    }
    .note-form-footer p {
      max-width: none;
    }
    .timeline-top {
      align-items: start;
      flex-direction: column;
      gap: 5px;
    }
    .toasts {
      bottom: 14px;
      max-width: calc(100% - 24px);
    }
    .toast {
      padding: 12px 14px;
      font-size: 11px;
      gap: 8px;
    }
    .bulk-bar {
      flex-wrap: wrap;
      gap: 7px;
    }
    .bulk-bar > span {
      flex-basis: 100%;
    }
    .radar {
      display: none;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      transition: none !important;
      animation: none !important;
    }
  }
  @media (max-width: 650px) {
    .sidebar:not(.open) {
      visibility: hidden;
    }
    .breadcrumb > .mobile-brand {
      display: inline-flex;
    }
    .mobile-brand .logo-mark {
      width: 21px;
      height: 21px;
    }
    .topbar {
      padding-inline: 10px;
    }
    .breadcrumb {
      gap: 6px;
    }
    .top-actions .icon-button {
      min-height: 44px;
      width: 40px;
    }
    .language-switch button {
      min-height: 36px;
    }
    .segmented button {
      min-height: 36px;
    }
    .toolbar > .button {
      min-height: 40px;
    }
    .pagination .icon-button {
      min-height: 40px;
      width: 36px;
    }
    .ticket-row > .ticket-priority {
      font-size: 11px;
    }
    .ticket-row > .status {
      font-size: 11px;
    }
    .mobile-menu {
      min-height: 44px;
    }
    .nav-item {
      font-size: 13px;
    }
  }
}
