/* File role: Defines the application design system, layout shells, components, and responsive styling. */

:root {
    --canvas: #eef2f6;
    --surface: rgba(255, 255, 255, 0.96);
    --surface-alt: #f6f1e7;
    --surface-muted: #edf1f5;
    --surface-dark: #0f1d2f;
    --surface-dark-alt: #14263a;
    --border: #ccd5df;
    --border-strong: #afbcc9;
    --text-strong: #1b2430;
    --text-muted: #617081;
    --text-soft: #79889a;
    --blue: #1569d8;
    --blue-deep: #0f4c94;
    --blue-ink: #123153;
    --cyan: #1a9c9c;
    --green: #2d8f62;
    --slate: #7b8794;
    --accent: #c88745;
    --accent-soft: #f3e0cc;
    --priority-urgent: #c5332f;
    --priority-urgent-ink: #7d1414;
    --priority-urgent-soft: #fde7e5;
    --priority-urgent-border: #f0b3ae;
    --priority-normal: #1569d8;
    --priority-normal-ink: #123153;
    --priority-normal-soft: #e7f0fe;
    --priority-normal-border: #b5cef3;
    --priority-low: #6f7f90;
    --priority-low-ink: #324150;
    --priority-low-soft: #edf1f5;
    --priority-low-border: #c9d3dd;
    --state-error: #b3261e;
    --state-error-ink: #7d1414;
    --state-warning: #a65810;
    --state-success-ink: #1f6d2b;
    --shadow: 0 26px 60px rgba(18, 34, 53, 0.11);
    --shadow-soft: 0 14px 34px rgba(18, 34, 53, 0.08);
    --radius-lg: 30px;
    --radius-md: 20px;
    --radius-sm: 14px;
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 14px;
    --space-4: 18px;
    --space-5: 24px;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    color: var(--text-strong);
    background: #edf2f6;
    text-rendering: optimizeLegibility;
}

body::before {
    content: none;
}

a {
    color: inherit;
}

.icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 0.95rem;
    height: 0.95rem;
}

.icon-md {
    width: 1.1rem;
    height: 1.1rem;
}

.icon-lg {
    width: 1.35rem;
    height: 1.35rem;
}

.with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.with-icon-tight {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 1000;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--text-strong);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    top: 16px;
}

.login-shell {
    width: min(560px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 36px 0;
}

.login-panel,
.error-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.brand-mark {
    width: 54px;
    height: 54px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    background: rgba(21, 105, 216, 0.08);
    border: 1px solid var(--border);
}

.brand-mark span {
    display: block;
    border-radius: 8px;
    background: var(--blue);
}

.brand-mark span:nth-child(3),
.brand-mark span:nth-child(4) {
    background: var(--cyan);
}

.brand-mark.small {
    width: 34px;
    height: 34px;
    padding: 4px;
    gap: 4px;
    border-radius: 10px;
}

.logo-image {
    display: block;
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-deep);
}

h1,
h2,
h3,
strong {
    margin: 0;
}

h1 {
    font-family: "Sora", "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: clamp(2.5rem, 4.4vw, 4.15rem);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 700;
}

h2 {
    font-family: "Sora", "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.9rem, 2.4vw, 2.55rem);
    letter-spacing: -0.03em;
    font-weight: 700;
}

h3 {
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.panel-copy,
.field small,
.error-card p {
    color: var(--text-muted);
    line-height: 1.6;
}

.login-panel {
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: #f3f7fb;
}

.logo-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.7rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(0, 114, 206, 0.1);
    color: var(--blue);
    font-size: 0.86rem;
    font-weight: 700;
}

.panel-body {
    padding: 30px 28px 28px;
}

.ticket-volume-chart {
    display: grid;
    gap: 16px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.chart-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.chart-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.chart-legend-swatch-created {
    background: var(--blue);
}

.chart-legend-swatch-closed {
    background: var(--green);
}

.chart-surface {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fbfdff;
    padding: 12px;
}

.chart-surface-svg {
    width: 100%;
    min-height: 320px;
}

.chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.chart-grid-row line {
    stroke: #d8e0e8;
    stroke-width: 1;
}

.chart-grid-row text,
.chart-axis-label {
    fill: var(--text-soft);
    font-family: "Manrope", "Segoe UI", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.chart-line {
    fill: none;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-line-created {
    stroke: var(--blue);
}

.chart-line-closed {
    stroke: var(--green);
}

.chart-point {
    stroke: #fff;
    stroke-width: 2;
}

.chart-point-created {
    fill: var(--blue);
}

.chart-point-closed {
    fill: var(--green);
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.chart-footer-note {
    color: var(--text-soft);
}

.empty-state.compact {
    min-height: 220px;
}

.fieldset-card {
    margin: 0;
    padding: 0;
    border: 0;
}

.workflow-builder {
    display: grid;
    gap: 18px;
}

.workflow-builder.is-disabled {
    opacity: 0.68;
}

.workflow-builder[hidden],
[data-category-team-section][hidden] {
    display: none !important;
}

.workflow-builder-heading {
    align-items: flex-start;
}

.workflow-step-list {
    display: grid;
    gap: 16px;
}

.workflow-step-card {
    border: 1px solid var(--border);
    border-radius: 22px;
    background: #fbfdff;
    padding: 18px;
    display: grid;
    gap: 18px;
    box-shadow: var(--shadow-soft);
}

.workflow-step-card-static {
    padding-top: 20px;
}

.workflow-step-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.workflow-step-order {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.workflow-step-order-label {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.workflow-step-order strong {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-strong);
}

.workflow-step-remove {
    white-space: nowrap;
}

.workflow-step-fields {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workflow-step-owners {
    display: grid;
    gap: 12px;
}

.workflow-step-owners-copy p {
    margin: 4px 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.workflow-agent-chip {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    padding: 14px 16px;
    display: block;
    cursor: pointer;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.workflow-agent-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.workflow-agent-chip-body {
    display: grid;
    gap: 4px;
}

.workflow-agent-chip-body strong {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-strong);
}

.workflow-agent-chip-body small {
    color: var(--text-muted);
    line-height: 1.4;
}

.workflow-agent-chip.is-selected {
    border-color: var(--blue);
    background: #eef5ff;
    box-shadow: 0 0 0 3px rgba(21, 105, 216, 0.12);
}

.workflow-builder-help {
    color: var(--text-muted);
}

.field-error-block {
    display: block;
    color: var(--state-error);
    margin-top: -4px;
}

@media (max-width: 960px) {
    .workflow-step-fields {
        grid-template-columns: 1fr;
    }
}

.panel-copy {
    margin: 10px 0 0;
}

.notice {
    margin-top: 18px;
    padding: 15px 18px;
    border-radius: 18px;
    border: 1px solid var(--border);
    font-size: 0.96rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.notice-body {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-body .icon {
    margin-top: 1px;
}

.notice-info {
    background: rgba(21, 105, 216, 0.08);
    color: var(--blue-ink);
    border-color: rgba(21, 105, 216, 0.22);
}

.notice-error {
    background: rgba(179, 38, 30, 0.08);
    color: var(--state-error-ink);
    border-color: rgba(179, 38, 30, 0.22);
}

.notice-inline {
    margin-top: 0;
}

.login-form {
    margin-top: 24px;
    display: grid;
    gap: 18px;
}

.login-quick-access {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
}

.login-sso {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 14px;
}

.login-sso-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(18, 49, 83, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(243, 247, 251, 0.86), rgba(255, 255, 255, 0.98));
}

.login-sso-card.is-disabled {
    background: linear-gradient(180deg, rgba(243, 247, 251, 0.64), rgba(251, 253, 255, 0.92));
    border-style: dashed;
}

.login-sso-card .button-neutral[disabled] {
    width: 100%;
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-style: dashed;
    background: linear-gradient(180deg, rgba(236, 240, 245, 0.88), rgba(247, 249, 252, 0.98));
    color: var(--text-muted);
    filter: grayscale(1);
}

.login-sso-card .button-neutral[disabled] svg {
    opacity: 0.72;
}

.login-sso-card .button-sso-disabled {
    position: relative;
}

.login-sso-card .button-sso-disabled::after {
    content: 'Disabled';
    position: absolute;
    top: -10px;
    right: 14px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(18, 49, 83, 0.08);
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-sso-reason {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.45;
    font-size: 0.9rem;
}

.login-quick-access-header {
    display: grid;
    gap: 4px;
}

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

.quick-access-card {
    margin: 0;
}

.quick-access-button {
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
    border: 1px solid rgba(18, 49, 83, 0.12);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(243, 247, 251, 0.92), rgba(255, 255, 255, 0.98));
    color: var(--blue-ink);
    cursor: pointer;
    display: grid;
    gap: 1px;
    text-align: left;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.quick-access-button:hover,
.quick-access-button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(21, 105, 216, 0.3);
    box-shadow: 0 14px 28px rgba(18, 49, 83, 0.12);
}

.quick-access-label {
    font-weight: 800;
    font-size: 0.82rem;
    line-height: 1.15;
}

.quick-access-meta {
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
    word-break: break-word;
}

.field {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.field span {
    font-size: 0.98rem;
}

.field input {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font: inherit;
    color: var(--text-strong);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.field textarea {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font: inherit;
    color: var(--text-strong);
    outline: none;
    resize: vertical;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.field select {
    width: 100%;
    padding: 15px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font: inherit;
    color: var(--text-strong);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.field input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(21, 105, 216, 0.12);
    transform: translateY(-1px);
}

.field select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(21, 105, 216, 0.12);
    transform: translateY(-1px);
}

.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(21, 105, 216, 0.12);
    transform: translateY(-1px);
}

.field input.is-invalid {
    border-color: rgba(179, 38, 30, 0.62);
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.08);
}

.field select.is-invalid {
    border-color: rgba(179, 38, 30, 0.62);
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.08);
}

.field textarea.is-invalid {
    border-color: rgba(179, 38, 30, 0.62);
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.08);
}

.field small {
    font-size: 0.88rem;
    color: var(--state-error);
}

.field-hint {
    color: var(--text-muted);
}

.field-hint strong {
    font-weight: 700;
}

.button-primary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid rgba(13, 49, 83, 0.08);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--blue-ink));
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    box-shadow: 0 16px 32px rgba(18, 49, 83, 0.22);
}

.button-primary:hover,
.button-primary:focus-visible {
    transform: translateY(-2px);
    filter: saturate(1.06);
}

.button-success {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid rgba(22, 92, 57, 0.12);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--green), #1f6f4b);
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    box-shadow: 0 16px 32px rgba(31, 111, 75, 0.22);
}

.button-success:hover,
.button-success:focus-visible {
    transform: translateY(-2px);
    filter: saturate(1.06);
}

.button-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(18, 49, 83, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--blue-ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
    backdrop-filter: blur(8px);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(18, 49, 83, 0.08);
    border-color: rgba(18, 49, 83, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.button-critical {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid rgba(125, 20, 20, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--priority-urgent), var(--priority-urgent-ink));
    color: #fff;
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
    box-shadow: 0 16px 32px rgba(125, 20, 20, 0.24);
}

.button-critical:hover,
.button-critical:focus-visible {
    transform: translateY(-2px);
    filter: saturate(1.06);
}

.button-neutral {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    padding: 0 24px;
    border: 1px solid rgba(18, 49, 83, 0.1);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(232, 238, 245, 0.98));
    color: var(--blue-ink);
    font: inherit;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease, border-color 160ms ease;
    box-shadow: 0 16px 32px rgba(18, 49, 83, 0.12);
}

.button-neutral:hover,
.button-neutral:focus-visible {
    transform: translateY(-2px);
    filter: saturate(1.04);
    border-color: rgba(18, 49, 83, 0.18);
}

.button-primary:focus-visible,
.button-neutral:focus-visible,
.button-critical:focus-visible,
.button-secondary:focus-visible,
.nav-link:focus-visible,
.table-link:focus-visible,
.skip-link:focus-visible {
    outline: 3px solid rgba(0, 114, 206, 0.24);
    outline-offset: 2px;
}

.button-primary-compact,
.button-neutral-compact,
.button-critical-compact,
.button-secondary-compact {
    min-height: 40px;
    padding: 0 14px;
}

.is-loading {
    opacity: 0.84;
    cursor: wait;
}

.is-success {
    border-color: rgba(93, 187, 99, 0.28);
    color: var(--success-deep);
}

body.has-modal {
    overflow: hidden;
}

.confirmation-layer[hidden] {
    display: none;
}

.confirmation-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 24px;
}

.confirmation-layer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 34, 0.42);
}

.confirmation-dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    display: grid;
    gap: 14px;
    padding: 26px;
    border: 1px solid rgba(18, 49, 83, 0.1);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 60px rgba(12, 27, 46, 0.22);
}

.confirmation-dialog-copy {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.dashboard-shell {
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 36px 0;
}

.workspace-shell {
    width: min(1380px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    padding: 20px 0;
}

.workspace-sidebar {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 18px;
    padding: 22px 18px;
    border: 1px solid rgba(11, 29, 46, 0.12);
    border-radius: 28px;
    background: var(--surface-dark);
    box-shadow: 0 30px 60px rgba(15, 29, 47, 0.26);
}

.workspace-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.workspace-brand p,
.summary-card p,
.hero-copy,
.progress-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.workspace-brand,
.workspace-nav,
.workspace-sidebar-meta {
    color: rgba(243, 247, 251, 0.96);
}

.workspace-brand p,
.workspace-sidebar-meta .summary-label {
    color: rgba(205, 217, 230, 0.82);
}

.workspace-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.workspace-nav {
    display: grid;
    gap: 16px;
}

.workspace-nav-group {
    display: grid;
    gap: 8px;
}

.workspace-nav-label {
    margin: 0;
    padding: 0 14px;
    color: rgba(205, 217, 230, 0.64);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(234, 241, 247, 0.92);
    text-decoration: none;
    font-weight: 700;
    transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.nav-link .icon {
    opacity: 0.9;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-link.is-active {
    background: var(--blue);
    color: #fff;
    box-shadow: 0 18px 30px rgba(20, 108, 216, 0.26);
}

.workspace-sidebar-meta {
    align-self: end;
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
}

.workspace-sidebar-signout {
    margin-top: 6px;
}

.workspace-sidebar-signout .button-secondary {
    width: 100%;
    justify-content: center;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.workspace-sidebar-signout .button-secondary:hover,
.workspace-sidebar-signout .button-secondary:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

.sidebar-role {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0, 114, 206, 0.08);
    color: var(--blue);
    font-weight: 700;
    font-size: 0.82rem;
}

.sidebar-version {
    display: inline-flex;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.workspace-main {
    display: grid;
    gap: 18px;
    align-content: start;
    width: min(100%, 1040px);
    justify-self: center;
}

.public-shell {
    width: min(980px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    align-items: center;
    padding: 28px 0;
}

.public-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(18, 49, 83, 0.1);
    border-radius: 34px;
    background: rgba(255, 253, 249, 0.98);
    box-shadow: 0 28px 70px rgba(18, 34, 53, 0.12);
}

.public-card::after {
    content: none;
}

.public-card-confirmation {
    max-width: 720px;
}

.public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(18, 49, 83, 0.08);
}

.public-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.public-body {
    display: grid;
    gap: 28px;
    padding: 32px;
}

.public-logo {
    width: 42px;
    height: 42px;
}

.public-intro {
    display: grid;
    gap: 10px;
}

.public-page-intro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 26px 28px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.public-page-intro-full {
    grid-template-columns: minmax(0, 1fr);
}

.public-page-intro-centered {
    text-align: center;
    justify-items: center;
}

.public-page-copy {
    display: grid;
    gap: 10px;
}

.public-decision {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.decision-item {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(18, 49, 83, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.58);
}

.decision-item strong {
    font-size: 0.96rem;
    letter-spacing: -0.01em;
}

.decision-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.decision-item-active {
    border-color: rgba(21, 105, 216, 0.22);
    background: rgba(240, 247, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.public-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
}

.ticket-portal-intro {
    gap: 18px;
}

.ticket-portal-intro .public-page-copy {
    max-width: 100%;
}

.ticket-portal-intro .public-page-actions {
    width: 100%;
    justify-content: flex-start;
}

.summary-card-header,
.section-title,
.empty-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.summary-card-header .icon,
.section-title .icon,
.empty-title .icon {
    color: var(--accent);
}

.summary-card-value {
    display: block;
    font-size: 2.2rem;
    line-height: 0.92;
    letter-spacing: -0.05em;
    font-weight: 800;
}

.public-form {
    display: grid;
    gap: 20px;
}

.public-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 15px 18px;
    border: 1px solid rgba(18, 49, 83, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

.public-meta-stack {
    flex-direction: column;
    align-items: flex-start;
}

.public-meta-warning {
    border-color: rgba(200, 135, 69, 0.18);
    background: rgba(248, 243, 233, 0.94);
}

.public-meta p {
    margin: 0;
    color: var(--text-muted);
}

.public-meta a {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.public-meta .button-primary,
.public-meta .button-success,
.public-meta .button-critical {
    color: #fff;
}

.public-meta .button-secondary,
.public-meta .button-neutral {
    color: var(--blue-ink);
}

.public-meta a:hover,
.public-meta a:focus-visible {
    text-decoration: underline;
}

.turnstile-field {
    padding: 15px 18px;
    border: 1px solid rgba(18, 49, 83, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
}

.turnstile-field .cf-turnstile {
    min-height: 66px;
}

.turnstile-field small:last-child {
    display: block;
}

.confirmation-body {
    text-align: center;
    justify-items: center;
    padding: 40px 32px;
}

.confirmation-intro {
    width: 100%;
    justify-items: center;
}

.confirmation-intro .public-page-copy {
    width: min(100%, 520px);
    justify-items: center;
}

.confirmation-intro .hero-copy,
.confirmation-intro .confirmation-next-step {
    width: 100%;
}

.confirmation-grid {
    display: grid;
    width: 100%;
    gap: 16px;
}

.confirmation-reference {
    display: grid;
    gap: 10px;
    width: 100%;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(18, 49, 83, 0.1);
    background: rgba(246, 241, 232, 0.94);
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.confirmation-reference strong {
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    word-break: break-word;
}

.confirmation-reference-link strong {
    font-size: 1rem;
}

.confirmation-copy {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.confirmation-next-step {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(21, 105, 216, 0.14);
    border-radius: 18px;
    background: rgba(240, 247, 255, 0.84);
}

.confirmation-next-step strong {
    font-size: 0.96rem;
}

.confirmation-next-step p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.workspace-topbar,
.content-card,
.hero-panel {
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(18, 34, 53, 0.08);
}

.workspace-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    align-self: start;
    background: rgba(255, 255, 255, 0.95);
}

.workspace-topbar-compact {
    padding: 16px 20px;
    align-items: center;
}

.workspace-heading-block {
    display: grid;
    flex: 1 1 auto;
    width: 100%;
    gap: 6px;
}

.workspace-topbar-compact .workspace-heading-block {
    gap: 2px;
}

.workspace-topbar-copy {
    margin: 0;
    width: 100%;
    max-width: none;
    color: var(--text-muted);
    line-height: 1.6;
}

.workspace-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
}

.workspace-content {
    display: grid;
    gap: 18px;
    align-content: start;
}

.hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: end;
    padding: 30px;
    background: rgba(255, 255, 255, 0.97);
}

.hero-copy {
    width: 100%;
    max-width: none;
    margin-top: 12px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
}

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

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

.dashboard-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-body {
    display: grid;
    gap: 24px;
}

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

.summary-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(18, 49, 83, 0.08);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.summary-card-kpi {
    gap: 12px;
}

.summary-card-kpi .summary-card-value {
    font-size: clamp(3rem, 5vw, 4.8rem);
}

.summary-card-accent {
    background: rgba(246, 241, 232, 0.95);
}

.summary-card-critical {
    border-color: rgba(197, 51, 47, 0.26);
    background: rgba(253, 239, 237, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 18px 34px rgba(197, 51, 47, 0.12);
}

.summary-card-critical .summary-card-header .icon,
.summary-card-critical .summary-label,
.summary-card-critical .summary-card-value {
    color: var(--priority-urgent-ink);
}

.summary-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.content-card {
    padding: 24px;
}

.content-card-form {
    padding: 28px;
}

.content-card-primary {
    border-color: rgba(21, 105, 216, 0.16);
    background: rgba(240, 247, 255, 0.92);
}

.ticket-overview-card {
    display: grid;
    gap: 22px;
}

.ticket-overview-heading {
    margin-bottom: 0;
}

.ticket-overview-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ticket-overview-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: 14px;
}

.ticket-workflow-progress {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0;
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(18, 49, 83, 0.1);
    background: #edf2f7;
}

.ticket-workflow-progress-step {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 16px 18px 16px 24px;
    background: #edf2f7;
    min-height: 92px;
}

.ticket-workflow-progress-step::after {
    content: '';
    position: absolute;
    top: 0;
    right: -22px;
    width: 44px;
    height: 100%;
    background: inherit;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    z-index: 2;
}

.ticket-workflow-progress.is-simple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-workflow-progress.is-simple .ticket-workflow-progress-step {
    min-height: 74px;
    padding: 14px 16px 14px 20px;
}

.ticket-workflow-progress.is-simple .ticket-workflow-progress-step::after {
    right: -16px;
    width: 32px;
}

.ticket-workflow-progress-step:last-child::after {
    display: none;
}

.ticket-workflow-progress-step + .ticket-workflow-progress-step {
    border-left: 1px solid rgba(18, 49, 83, 0.06);
}

.ticket-workflow-progress-step.is-active {
    background: #17a7c8;
    color: #fff;
}

.ticket-workflow-progress-step.is-completed {
    background: #17a7c8;
    color: #fff;
}

.ticket-workflow-progress-step.is-pending {
    background: #edf2f7;
    color: var(--text-strong);
}

.ticket-workflow-progress-meta,
.ticket-workflow-progress-state {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ticket-workflow-progress-step strong {
    font-size: 1rem;
    line-height: 1.3;
}

.ticket-workflow-progress-step.is-pending .ticket-workflow-progress-meta,
.ticket-workflow-progress-step.is-pending .ticket-workflow-progress-state {
    color: var(--text-soft);
}

.ticket-overview-item {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 20px;
    background: rgba(248, 250, 252, 0.76);
}

.ticket-overview-item strong {
    font-size: 1rem;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.ticket-overview-item span:last-child {
    color: var(--text-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ticket-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 22px;
    align-items: start;
}

.ticket-detail-main,
.ticket-detail-side,
.ticket-control-stack {
    display: grid;
    gap: 22px;
}

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

.ticket-message-form .hero-actions {
    margin-top: 8px;
}

.ticket-detail-side {
    position: sticky;
    top: 24px;
}

.ticket-control-card .section-heading {
    margin-bottom: 16px;
}

.ticket-control-group {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.78);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.ticket-control-heading {
    display: grid;
    gap: 4px;
}

.ticket-control-heading strong {
    font-size: 1rem;
}

.ticket-control-heading span,
.ticket-inline-help {
    color: var(--text-muted);
    line-height: 1.55;
}

.ticket-control-inline-form {
    gap: 10px;
}

.ticket-control-inline-form .field {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.ticket-control-inline-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.ticket-control-inline-form .priority-select {
    min-width: 0;
    width: 100%;
}

.ticket-control-inline-action {
    min-width: 46px;
    width: 46px;
    padding: 0;
    aspect-ratio: 1;
    border-radius: 12px;
    box-shadow: 0 12px 24px rgba(18, 49, 83, 0.18);
}

.ticket-control-inline-action .icon {
    width: 1rem;
    height: 1rem;
}

.ticket-inline-help {
    margin: 0;
}

.ticket-history-card {
    opacity: 0.96;
}

.public-body > .content-card {
    background: rgba(250, 247, 240, 0.92);
}

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

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.icon-field {
    position: relative;
}

.icon-field .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    pointer-events: none;
}

.icon-field input {
    padding-left: 42px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.progress-list {
    display: grid;
    gap: 14px;
}

.progress-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    background: rgba(244, 248, 251, 0.9);
}

.progress-index {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue);
    color: #fff;
    font-weight: 700;
}

.status-meta {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.95rem;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.98);
}

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

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.data-table th {
    background: #edf2f6;
    color: var(--text-soft);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr {
    transition: background-color 140ms ease;
}

.data-table tbody tr:hover {
    background: rgba(21, 105, 216, 0.035);
}

.table-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(21, 105, 216, 0.12);
    color: var(--blue-ink);
    font-weight: 800;
    font-size: 0.76rem;
    letter-spacing: 0.03em;
}

.table-badge-priority {
    border: 1px solid transparent;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.table-badge-muted {
    background: rgba(123, 135, 148, 0.14);
    color: #41505d;
}

.priority-urgent {
    background: var(--priority-urgent-soft);
    color: var(--priority-urgent-ink);
    border-color: var(--priority-urgent-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.priority-normal {
    background: var(--priority-normal-soft);
    color: var(--priority-normal-ink);
    border-color: var(--priority-normal-border);
}

.priority-low {
    background: var(--priority-low-soft);
    color: var(--priority-low-ink);
    border-color: var(--priority-low-border);
}

.status-open {
    background: rgba(0, 114, 206, 0.12);
    color: var(--blue-ink);
}

.status-in_progress {
    background: rgba(0, 167, 196, 0.12);
    color: #005d6d;
}

.status-closed {
    background: rgba(93, 187, 99, 0.14);
    color: var(--state-success-ink);
}

.status-resolved {
    background: rgba(34, 146, 122, 0.14);
    color: #1b6c5a;
}

.status-archived {
    background: rgba(123, 135, 148, 0.14);
    color: #46515d;
}

.table-link {
    color: var(--blue);
    font-weight: 700;
    text-decoration: none;
}

.table-link.with-icon,
.button-primary.with-icon,
.button-success.with-icon,
.button-neutral.with-icon,
.button-critical.with-icon,
.button-secondary.with-icon,
.nav-link.with-icon {
    white-space: nowrap;
}

.table-link:hover,
.table-link:focus-visible {
    text-decoration: underline;
}

.empty-state {
    padding: 32px;
    border: 1px dashed rgba(18, 49, 83, 0.14);
    border-radius: 24px;
    background: rgba(245, 248, 251, 0.86);
}

.empty-state h3 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
}

.empty-icon {
    color: var(--accent);
    opacity: 0.9;
}

.active-filter-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
}

.active-filter-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ticket-primary-cell,
.ticket-submitter,
.ticket-subject,
.message-author {
    display: grid;
    gap: 4px;
}

.ticket-meta-line,
.ticket-submitter span,
.timeline-meta-detail {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.ticket-flags {
    gap: 8px;
}

.table-link-strong {
    font-size: 0.98rem;
}

.row-urgent td:first-child {
    box-shadow: inset 5px 0 0 rgba(197, 51, 47, 0.88);
}

.row-unassigned td:first-child {
    background-color: rgba(213, 123, 22, 0.06);
}

.row-new td:first-child {
    background-color: rgba(0, 114, 206, 0.06);
}

.priority-form {
    display: grid;
    gap: 16px;
}

.priority-select {
    min-width: 220px;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text-strong);
    font: inherit;
    outline: none;
}

.priority-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(0, 114, 206, 0.12);
}

.priority-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.priority-display .summary-card-value {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.priority-summary-card {
    position: relative;
}

.priority-summary-card.priority-urgent {
    border-color: rgba(197, 51, 47, 0.22);
    background: rgba(252, 240, 238, 0.96);
}

.priority-summary-card.priority-normal {
    border-color: rgba(21, 105, 216, 0.16);
    background: rgba(239, 246, 255, 0.94);
}

.priority-summary-card.priority-low {
    border-color: rgba(111, 127, 144, 0.18);
    background: rgba(242, 245, 248, 0.95);
}

.priority-summary-card.priority-urgent .summary-card-header .icon,
.priority-summary-card.priority-urgent .summary-card-value {
    color: var(--priority-urgent-ink);
}

.priority-summary-card.priority-normal .summary-card-header .icon,
.priority-summary-card.priority-normal .summary-card-value {
    color: var(--priority-normal-ink);
}

.priority-summary-card.priority-low .summary-card-header .icon,
.priority-summary-card.priority-low .summary-card-value {
    color: var(--priority-low-ink);
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline-item {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-soft);
    animation: rise-in 300ms ease both;
}

.timeline-item p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.65;
}

.public-message {
    box-shadow: var(--shadow-soft);
}

.message-team {
    border-color: rgba(0, 114, 206, 0.24);
    background: rgba(235, 244, 252, 0.92);
}

.message-submitter {
    border-color: rgba(123, 135, 148, 0.18);
    background: rgba(244, 247, 250, 0.92);
}

.message-internal {
    border-color: rgba(200, 135, 69, 0.2);
    background: rgba(249, 242, 231, 0.94);
}

.message-attachments {
    display: grid;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid rgba(18, 49, 83, 0.08);
}

.message-attachments-title {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.message-attachments-list {
    display: grid;
    gap: 10px;
}

.message-attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.message-attachment-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    background: rgba(237, 242, 247, 0.95);
    color: var(--blue-ink);
}

.message-attachment-icon .icon {
    width: 2rem;
    height: 2rem;
}

.attachment-kind-image {
    background: rgba(231, 240, 254, 0.96);
    color: var(--blue);
}

.attachment-kind-pdf {
    background: rgba(253, 231, 229, 0.96);
    color: var(--priority-urgent);
}

.attachment-kind-file {
    background: rgba(237, 241, 245, 0.96);
    color: var(--accent);
}

.message-attachment-meta {
    display: grid;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.message-attachment-meta span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.message-attachment-item .toolbar-actions {
    flex: 0 0 auto;
    gap: 10px;
    margin-left: 12px;
}

.badge-team {
    background: rgba(0, 114, 206, 0.12);
    color: var(--blue-ink);
}

.badge-submitter {
    background: rgba(123, 135, 148, 0.14);
    color: #42515d;
}

.history-item {
    border-left: 4px solid rgba(0, 114, 206, 0.16);
}

.history-entry-heading {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.history-tag-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    border: 1px solid rgba(18, 49, 83, 0.08);
}

.history-tag-email {
    background: rgba(21, 105, 216, 0.12);
    color: var(--blue-ink);
}

.history-tag-default {
    background: rgba(123, 135, 148, 0.14);
    color: #42515d;
}

.file-preview {
    min-height: 0;
}

.attachment-picker {
    display: grid;
    gap: 12px;
}

.attachment-picker-empty {
    margin: 0;
    padding: 10px 12px;
    border: 1px dashed rgba(18, 49, 83, 0.14);
    border-radius: 12px;
    background: rgba(246, 249, 252, 0.94);
    color: var(--text-muted);
    font-size: 0.92rem;
}

.file-preview-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.94);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.file-preview-meta {
    display: grid;
    gap: 2px;
}

.file-preview-meta strong {
    font-size: 0.93rem;
    color: var(--text-strong);
}

.file-preview-meta span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.file-preview-remove {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text-strong);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
}

.file-preview-remove:hover,
.file-preview-remove:focus-visible {
    border-color: var(--blue);
    color: var(--blue);
    outline: none;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
}

.pagination-meta {
    color: var(--text-muted);
    font-size: 0.94rem;
    font-weight: 700;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.button-primary,
.button-neutral,
.button-critical,
.button-secondary,
.content-card,
.summary-card,
.public-card,
.workspace-sidebar,
.workspace-topbar,
.table-wrap,
.timeline-item,
.confirmation-reference {
    animation: rise-in 360ms ease both;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.sr-only-copy-visible {
    position: static;
    width: 100%;
    height: auto;
    margin: 0;
    clip: auto;
    white-space: normal;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-strong);
    background: #fff;
}

.timeline-item-compact {
    padding: 16px 18px;
}

.timeline-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.timeline-meta span {
    color: var(--text-muted);
    font-size: 0.92rem;
}

@media (max-width: 1100px) {
    .workspace-shell {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        grid-template-rows: auto auto auto;
    }

    .summary-grid,
    .summary-grid-wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ticket-overview-meta,
    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

    .ticket-detail-side {
        position: static;
        top: auto;
    }

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

@media (max-width: 760px) {
    .login-shell,
    .dashboard-shell,
    .public-shell {
        width: min(100%, calc(100% - 20px));
    }

    .panel-header,
    .workspace-topbar,
    .public-header,
    .public-page-intro,
    .section-heading,
    .page-heading,
    .timeline-meta,
    .public-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid,
    .summary-grid-wide,
    .form-grid,
    .public-decision {
        grid-template-columns: 1fr;
    }

    .ticket-overview-meta {
        grid-template-columns: 1fr;
    }

    .ticket-workflow-progress.is-simple {
        grid-template-columns: 1fr;
    }

    .content-card,
    .content-card-form,
    .public-body,
    .panel-body {
        padding: 22px;
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .toolbar-actions,
    .hero-actions,
    .public-page-actions,
    .workspace-topbar-actions {
        width: 100%;
    }

    .toolbar-actions > *,
    .hero-actions > *,
    .public-page-actions > *,
    .workspace-topbar-actions > *,
    .message-attachment-item,
    .priority-select,
    .ticket-control-inline-action,
    .button-primary,
    .button-neutral,
    .button-critical,
    .button-secondary,
    .pagination-links {
        width: 100%;
    }

    .ticket-control-inline-form,
    .ticket-control-inline-row {
        grid-template-columns: 1fr;
    }

    .confirmation-body {
        padding: 28px 22px;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table th,
    .data-table td,
    .data-table tr {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: grid;
        gap: 14px;
        padding: 14px;
    }

    .data-table tr {
        border: 1px solid rgba(18, 49, 83, 0.08);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.98);
        overflow: hidden;
    }

    .data-table td {
        display: grid;
        gap: 6px;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(215, 224, 234, 0.7);
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--text-soft);
        font-size: 0.76rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }
}

.admin-form {
    display: grid;
    gap: 24px;
}

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

.checkbox-grid {
    display: grid;
    gap: 12px;
}

.toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    background: rgba(255, 255, 255, 0.78);
    font-weight: 700;
}

.toggle input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.error-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.error-card {
    max-width: 520px;
    padding: 32px;
}

.embed-body {
    background: transparent;
    margin: 0;
}

.embed-shell {
    width: min(100%, 860px);
    margin: 0 auto;
    padding: 0;
}

.embed-card {
    background: var(--surface-primary);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    padding: 28px;
}

.embed-header,
.embed-confirmation {
    display: grid;
    gap: 14px;
}

.embed-copy {
    width: 100%;
    max-width: none;
    margin: 0;
    color: var(--text-muted);
}

.embed-form {
    display: grid;
    gap: 20px;
}

.embed-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.embed-meta p {
    margin: 0;
}

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

.embed-confirmation-links {
    display: grid;
    gap: 14px;
}

.embed-confirmation-links p {
    margin: 0;
    color: var(--text-muted);
}

.embed-snippet-card {
    display: grid;
    gap: 18px;
}

.embed-snippet-card textarea {
    min-height: 96px;
    resize: vertical;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.92rem;
}

.stack-list {
    display: grid;
    gap: 14px;
}

.stack-list-item {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    background: var(--surface-secondary);
}

.stack-list-item strong {
    color: var(--text-primary);
}

.stack-list-item span {
    color: var(--text-muted);
}

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

.documentation-manager-card {
    display: grid;
    gap: 20px;
}

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

.documentation-manual-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(18, 49, 83, 0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 253, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 34px rgba(18, 49, 83, 0.08);
}

.documentation-manual-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.documentation-manual-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(21, 105, 216, 0.14), rgba(21, 105, 216, 0.08));
    color: var(--blue);
}

.documentation-manual-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.documentation-manual-copy strong {
    font-size: 1.05rem;
    color: var(--text-strong);
}

.documentation-manual-copy p,
.documentation-manual-meta span {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.55;
}

.documentation-manual-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.documentation-manual-status.is-available {
    background: rgba(45, 143, 98, 0.14);
    color: var(--green);
}

.documentation-manual-status.is-missing {
    background: rgba(213, 123, 22, 0.14);
    color: #9a5a0d;
}

.documentation-manual-meta {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(18, 49, 83, 0.06);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
}

.documentation-upload-form {
    display: grid;
    gap: 14px;
}

.documentation-upload-field {
    padding: 14px 16px;
    border: 1px dashed rgba(18, 49, 83, 0.18);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
}

.documentation-upload-field input[type="file"] {
    width: 100%;
}

.documentation-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

@media (max-width: 640px) {
    .login-shell {
        width: min(100% - 24px, 100%);
        padding: 24px 0;
    }

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

    .panel-body {
        padding: 24px;
    }

    .panel-header {
        padding: 18px 20px;
    }

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

    .page-heading,
    .form-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .workspace-shell {
        width: min(100% - 20px, 100%);
        grid-template-columns: 1fr;
        padding: 16px 0;
    }

    .public-shell {
        width: min(100% - 20px, 100%);
        padding: 16px 0;
    }

    .workspace-topbar,
    .hero-panel,
    .section-heading {
        grid-template-columns: 1fr;
        display: grid;
    }

    .workspace-topbar,
    .hero-actions {
        justify-content: flex-start;
    }

    .public-header,
    .public-meta,
    .embed-meta {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .embed-card {
        padding: 22px;
        border-radius: 20px;
    }

    .embed-confirmation-grid {
        grid-template-columns: 1fr;
    }

    .documentation-manual-head {
        grid-template-columns: auto 1fr;
    }

    .documentation-manual-status {
        grid-column: 1 / -1;
        justify-self: start;
    }

    h1 {
        font-size: 2.35rem;
    }

    h2 {
        font-size: 1.6rem;
    }
}
