:root {
    --ink: #17211f;
    --muted: #64716e;
    --line: #dfe7e4;
    --surface: #ffffff;
    --canvas: #f4f7f6;
    --primary: #087463;
    --primary-dark: #07584d;
    --primary-soft: #e5f5f1;
    --blue: #276fbd;
    --orange: #d97706;
    --purple: #7c3fad;
    --red: #c43f42;
    --shadow: 0 12px 36px rgba(26, 54, 48, .08);
    --radius: 18px;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .55rem; font-size: clamp(1.65rem, 2.5vw, 2.35rem); line-height: 1.25; }
h2 { margin-bottom: .35rem; font-size: 1.18rem; }
p { line-height: 1.75; }
small, .muted { color: var(--muted); }
code { direction: ltr; unicode-bidi: embed; padding: .15rem .4rem; border-radius: 6px; background: #eef2f1; }

.app-shell { display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.4rem 1rem; color: #eefaf7; background: linear-gradient(180deg, #0b6255 0%, #084b43 100%); box-shadow: -8px 0 28px rgba(16, 58, 51, .16); z-index: 10; }
.brand { display: flex; align-items: center; gap: .75rem; padding: .55rem; color: inherit; }
.brand:hover { color: inherit; }
.brand-mark { width: 52px; height: 44px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 13px; color: #fff; background: linear-gradient(135deg, #15a78f, #0a6758); font-size: .78rem; font-weight: 800; letter-spacing: -.05em; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.18rem; letter-spacing: .01em; }
.brand small { margin-top: .1rem; color: rgba(239,255,251,.68); font-size: .72rem; }
.nav-list { display: grid; gap: .35rem; margin-top: 2.2rem; }
.nav-list a { display: flex; align-items: center; gap: .8rem; padding: .8rem .9rem; border-radius: 11px; color: rgba(244,255,252,.78); transition: .18s ease; }
.nav-list a span { width: 24px; text-align: center; font-size: 1.15rem; }
.nav-list a:hover, .nav-list a.active { color: #fff; background: rgba(255,255,255,.11); transform: translateX(-2px); }
.nav-notification-count { min-width: 22px; margin-inline-start: auto; padding: .12rem .35rem; border-radius: 999px; color: #063f37; background: #a7eadc; text-align: center; font-size: .68rem; }
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.14); }
.user-chip { display: flex; align-items: center; gap: .65rem; margin-bottom: .8rem; padding: .45rem; min-width: 0; }
.user-chip span:last-child { min-width: 0; }
.user-chip strong, .user-chip small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip small { max-width: 165px; margin-top: .1rem; color: rgba(255,255,255,.62); direction: ltr; text-align: right; }
.language-form { margin-top: .45rem; }
.avatar { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: var(--primary-dark); background: #d9f4ed; font-weight: 800; }
.workspace { min-width: 0; }
.topbar { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1rem, 3vw, 2.2rem); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar p { margin-bottom: .15rem; }
.topbar-actions { display: flex; align-items: center; gap: .6rem; }
.topbar-actions form { margin: 0; }
.language-switch { min-width: 54px; }
.content { width: min(1500px, 100%); margin-inline: auto; padding: clamp(1rem, 3vw, 2.2rem); }
.eyebrow { margin-bottom: .3rem; color: var(--primary); font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .62rem 1rem; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-weight: 700; transition: .18s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 8px 18px rgba(8,116,99,.18); }
.button-primary:hover { color: #fff; background: var(--primary-dark); }
.button-secondary { color: var(--primary-dark); background: var(--primary-soft); border-color: #c4e6de; }
.button-secondary:hover { color: #064e43; background: #d5eee8; }
.button-light { color: var(--primary-dark); background: #fff; }
.button-quiet { color: inherit; background: transparent; border-color: var(--line); }
.sidebar .button-quiet { color: #effbf8; border-color: rgba(255,255,255,.2); }
.button-block { width: 100%; }
.button-large { min-height: 50px; padding-inline: 1.4rem; }

.alert { margin-bottom: 1rem; padding: .85rem 1rem; border-radius: 12px; border: 1px solid; }
.alert-success { color: #075b46; background: #e5f7f0; border-color: #b9e8d6; }
.alert-error { color: #8d292c; background: #fff0f0; border-color: #f1c7c8; }
.validation-summary, .field-validation-error { color: #a72e32; }
.validation-summary ul { margin: .35rem 0; }

.panel { min-width: 0; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-header h2, .panel-header p { margin-bottom: 0; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; margin-bottom: 1.3rem; }
.page-heading p:last-child { margin-bottom: 0; color: var(--muted); }
.compact-heading { align-items: center; }
.welcome-band { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.2rem; padding: clamp(1.3rem, 3vw, 2rem); overflow: hidden; border-radius: 20px; color: #fff; background: radial-gradient(circle at 10% 20%, rgba(255,255,255,.18), transparent 28%), linear-gradient(135deg, #087463, #0c574e); box-shadow: 0 18px 42px rgba(7, 88, 77, .18); }
.welcome-band .eyebrow, .welcome-band p { color: rgba(255,255,255,.78); }
.welcome-band p { margin-bottom: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card { position: relative; min-height: 142px; padding: 1.15rem; overflow: hidden; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.metric-card::after { content: ""; position: absolute; inset-inline-end: -28px; bottom: -38px; width: 110px; height: 110px; border-radius: 50%; opacity: .12; background: currentColor; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card strong { margin: .45rem 0 .2rem; font-size: 2.15rem; }
.metric-blue { color: var(--blue); }.metric-green { color: var(--primary); }.metric-orange { color: var(--orange); }.metric-purple { color: var(--purple); }
.metric-card span, .metric-card small { color: var(--muted); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(290px, 1fr); gap: 1rem; }
.span-two { grid-column: span 1; }

.ticket-list { display: grid; }
.ticket-row { display: grid; grid-template-columns: 130px minmax(220px, 1fr) auto auto; align-items: center; gap: .8rem; padding: .9rem .2rem; color: inherit; border-top: 1px solid #edf1f0; }
.ticket-row:first-child { border-top: 0; }
.ticket-row:hover { color: inherit; background: #fafcfb; }
.ticket-ref, .reference-link { color: var(--primary); font-weight: 800; direction: ltr; text-align: start; }
.ticket-main strong, .ticket-main small { display: block; }
.ticket-main small { margin-top: .22rem; }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: .3rem .55rem; border: 1px solid #dbe3e1; border-radius: 999px; color: #4b5956; background: #f2f5f4; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.status-new, .status-required { color: #1f5f9c; background: #eaf4ff; border-color: #cce2f9; }
.status-in-review, .status-assigned, .status-submitted { color: #6d4b0b; background: #fff7df; border-color: #f0dfad; }
.status-in-progress { color: #075f50; background: #e2f5f0; border-color: #bde5da; }
.status-pending, .status-on-hold { color: #944b0e; background: #fff1e4; border-color: #f3d3b8; }
.status-resolved, .status-closed, .status-accepted { color: #176335; background: #e9f7ee; border-color: #c8e8d3; }
.status-reopened, .status-rejected, .status-cancelled { color: #972f34; background: #ffeded; border-color: #f1c6c8; }
.priority-low { color: #46625c; background: #eff5f3; }.priority-medium { color: #2f5f9c; background: #edf4ff; }.priority-high { color: #a0540c; background: #fff1df; }.priority-critical { color: #a12d32; background: #ffeaeb; }

.notification-list { display: grid; }
.notification-item { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem .25rem; border-top: 1px solid #edf1f0; }
.notification-item:first-child { border-top: 0; }
.notification-item.unread { background: linear-gradient(90deg, transparent, #f0faf7); }
.notification-item p { margin: .2rem 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.notification-dot { width: 8px; height: 8px; margin-top: .45rem; border-radius: 50%; background: #c9d4d1; }
.unread .notification-dot { background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.notification-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; color: var(--primary-dark); background: var(--primary-soft); font-weight: 800; }
.notification-page-list .notification-item { align-items: center; padding: 1rem; }
.notification-title { display: flex; align-items: center; gap: .6rem; }

.field { display: grid; align-content: start; gap: .4rem; }
.field label { color: #34423f; font-size: .86rem; font-weight: 800; }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: .68rem .75rem; border: 1px solid #ced9d6; border-radius: 9px; color: var(--ink); background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,116,99,.1); }
.field-validation-error { font-size: .78rem; }
.grow { flex: 1; min-width: 0; }
.filter-panel { margin-bottom: 1rem; }
.filter-form { display: flex; align-items: end; gap: .8rem; }
.filter-form .grow { min-width: 260px; }
.filter-form .field:not(.grow) { width: 210px; }
.form-panel { max-width: 980px; margin-inline: auto; padding: clamp(1.2rem, 3vw, 2rem); }
.wide-form-panel { max-width: 1180px; }
.form-panel fieldset { margin: 0 0 1.7rem; padding: 0 0 1.7rem; border: 0; border-bottom: 1px solid var(--line); }
.form-panel legend { display: flex; align-items: center; gap: .65rem; width: 100%; margin-bottom: 1rem; font-size: 1.05rem; font-weight: 800; }
.form-panel legend span { width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px; color: var(--primary-dark); background: var(--primary-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.form-grid .span-two, .rating-form .span-two { grid-column: 1 / -1; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; }
.creation-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.choice-toggle { display: flex; align-items: center; gap: .7rem; min-height: 58px; padding: .8rem 1rem; border: 1px solid #cfe0dc; border-radius: 12px; background: #f7fbfa; cursor: pointer; }
.choice-toggle:has(input:checked) { color: var(--primary-dark); border-color: #78c8b7; background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(8,116,99,.08); }
.choice-toggle input { width: 19px; height: 19px; accent-color: var(--primary); }
.related-record-section + .related-record-section { margin-top: 1rem; }
.nested-form-section { margin: .8rem 0 1rem; padding: 1rem; border: 1px solid #dce8e5; border-radius: 14px; background: #fbfdfc; }

.table-panel { padding: 0; overflow: hidden; }
.table-meta { display: flex; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.responsive-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; text-align: start; border-bottom: 1px solid #edf1f0; white-space: nowrap; }
th { color: var(--muted); background: #fafcfb; font-size: .78rem; }
td { font-size: .9rem; }
tbody tr:hover { background: #fbfdfc; }
.progress-cell { display: flex; align-items: center; gap: .55rem; min-width: 130px; }
progress { width: 100%; height: 8px; overflow: hidden; border: 0; border-radius: 99px; background: #e5ecea; accent-color: var(--primary); }
progress::-webkit-progress-bar { background: #e5ecea; border-radius: 99px; } progress::-webkit-progress-value { background: var(--primary); border-radius: 99px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1rem; }
.pagination a, .pagination span { padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; }

.ticket-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem; padding: clamp(1.3rem, 3vw, 2rem); border-radius: 20px; color: #fff; background: linear-gradient(135deg, #123f3a, #087463); box-shadow: 0 16px 40px rgba(15,68,60,.16); }
.ticket-hero p { max-width: 850px; margin-bottom: 0; color: rgba(255,255,255,.75); }
.ticket-title-line { display: flex; align-items: center; gap: .7rem; }
.ticket-title-line h1 { margin: 0; }
.ticket-hero .badge { border-color: rgba(255,255,255,.25); }
.ticket-hero-actions { display: grid; justify-items: end; gap: .7rem; }
.ticket-hero-actions small { color: rgba(255,255,255,.65); }
.breadcrumb { display: flex; gap: .5rem; margin-bottom: .8rem; color: rgba(255,255,255,.65); font-size: .82rem; }
.breadcrumb a { color: #bce9df; }
.ticket-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px,1fr)); gap: .7rem; margin-bottom: 1rem; }
.ticket-summary-grid article { min-width: 0; display: grid; align-content: center; gap: .25rem; min-height: 105px; padding: 1rem; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.ticket-summary-grid span, .ticket-summary-grid small { color: var(--muted); font-size: .78rem; }
.ticket-summary-grid strong { overflow: hidden; text-overflow: ellipsis; }
.progress-summary progress { margin-top: .25rem; }
.ticket-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .85fr); align-items: start; gap: 1rem; }
.ticket-main-column, .ticket-side-column { display: grid; gap: 1rem; min-width: 0; }
.sticky-panel { position: sticky; top: 1rem; }
.inline-action-form { display: flex; align-items: end; gap: .7rem; }
.inline-action-form .field:first-of-type { min-width: 190px; }
.stack-form { display: grid; gap: .8rem; }
.action-box { margin-top: 1rem; padding: 1rem; border-radius: 12px; background: #f3faf8; }
.warning-box { background: #fff8ec; }
.comment-list { display: grid; }
.comment-card { display: flex; gap: .75rem; padding: 1rem 0; border-top: 1px solid #edf1f0; }
.comment-card:first-child { border-top: 0; }
.comment-card header { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.comment-card header > span:not(.badge) { color: var(--muted); font-size: .78rem; }
.comment-card p { margin: .35rem 0 0; white-space: pre-wrap; }
.internal-comment { margin-inline: -.5rem; padding-inline: .5rem; border-radius: 10px; background: #fff9ec; }
.comment-form { display: flex; align-items: end; gap: .7rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.visibility-field { width: 180px; }
.inspection-list { display: grid; }
.inspection-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: .8rem; padding: .9rem 0; border-top: 1px solid #edf1f0; }
.inspection-list article:first-child { border-top: 0; }
.inspection-list p { margin: .2rem 0 0; color: var(--muted); }
.inspection-warning { margin-bottom: .8rem; padding: .85rem 1rem; border: 1px solid #f0bf71; border-radius: 12px; color: #78410c; background: #fff6e6; line-height: 1.6; }
.attachment-list { display: grid; }
.attachment-list article { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .6rem; padding: .75rem 0; border-top: 1px solid #edf1f0; }
.attachment-list article:first-child { border-top: 0; }
.attachment-list strong, .attachment-list small { display: block; overflow: hidden; text-overflow: ellipsis; }
.file-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: #eaf3fe; }
.financial-card dl { margin: 0; }
.financial-card dl div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem 0; border-top: 1px solid #edf1f0; }
.financial-card dt { color: var(--muted); }.financial-card dd { margin: 0; font-weight: 800; }
.rating-form { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; }

.empty-state { display: grid; justify-items: center; align-content: center; min-height: 360px; text-align: center; }
.empty-state p { max-width: 600px; color: var(--muted); }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; margin-bottom: .8rem; border-radius: 18px; color: var(--primary-dark); background: var(--primary-soft); font-size: 1.5rem; font-weight: 900; }
.empty-compact { padding: 1.2rem; color: var(--muted); text-align: center; }
.empty-compact p { margin: 0; }

.guest-shell { background: #f3f7f6; }
.guest-language-form { position: fixed; inset-inline-end: 1rem; top: 1rem; z-index: 20; }
.guest-content { min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) minmax(480px, 1.1fr); }
.login-story { min-height: 100vh; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 4.5rem); color: #fff; background: radial-gradient(circle at 15% 20%, rgba(50,210,180,.32), transparent 28%), radial-gradient(circle at 85% 80%, rgba(255,255,255,.1), transparent 30%), linear-gradient(145deg, #063f37, #087463); }
.brand-light { width: fit-content; }
.login-story h1 { max-width: 680px; font-size: clamp(2.1rem, 4vw, 4.2rem); }
.login-story p { max-width: 650px; color: rgba(255,255,255,.72); font-size: 1.05rem; }
.login-story .eyebrow { color: #96e1d2; }
.feature-list { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: .6rem; align-items: center; color: rgba(255,255,255,.84); }
.feature-list span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: #063f37; background: #a7eadc; font-weight: 900; }
.login-card-wrap { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(460px, 100%); padding: clamp(1.4rem, 4vw, 2.5rem); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 25px 70px rgba(18,49,44,.12); }
.login-card .field { margin-bottom: 1rem; }
.login-heading { margin-bottom: 1.4rem; }
.mobile-brand { display: none; margin-bottom: 1rem; }
.login-note { margin: 1rem 0 0; color: var(--muted); font-size: .78rem; text-align: center; }

.realtime-toast-stack { position: fixed; inset-inline-end: 1.2rem; bottom: 1.2rem; z-index: 1000; width: min(380px, calc(100vw - 2rem)); display: grid; gap: .65rem; }
.realtime-toast { position: relative; padding: 1rem 1rem .9rem 2.4rem; border: 1px solid #b9e2d8; border-radius: 14px; background: #fff; box-shadow: 0 18px 50px rgba(15,68,60,.2); animation: toast-in .22s ease-out; }
[dir="rtl"] .realtime-toast { padding: 1rem 2.4rem .9rem 1rem; }
.realtime-toast strong { display: block; padding-inline-end: 1rem; }
.realtime-toast p { margin: .3rem 0 0; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.realtime-toast-link { cursor: pointer; }
.realtime-toast-link:focus { outline: 3px solid rgba(8,116,99,.2); outline-offset: 2px; }
.realtime-toast-close { position: absolute; inset-inline-start: .65rem; top: .55rem; border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 1.2rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

[dir="ltr"] .nav-list a:hover, [dir="ltr"] .nav-list a.active { transform: translateX(2px); }
[dir="ltr"] .user-chip small { text-align: left; }

@media (max-width: 1180px) {
    .app-shell { grid-template-columns: 220px minmax(0,1fr); }
    .ticket-summary-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ticket-row { grid-template-columns: 120px minmax(180px,1fr) auto; }
    .ticket-row .badge:last-child { display: none; }
}

@media (max-width: 860px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; height: auto; display: block; padding: .8rem 1rem; }
    .sidebar > .brand { justify-content: center; }
    .nav-list { grid-template-columns: repeat(4, 1fr); margin-top: .7rem; }
    .nav-list a { justify-content: center; padding: .6rem; font-size: .78rem; }
    .nav-list a span { display: none; }
    .sidebar-footer { display: none; }
    .topbar { min-height: 70px; }
    .dashboard-grid, .ticket-detail-grid { grid-template-columns: 1fr; }
    .sticky-panel { position: static; }
    .ticket-summary-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .login-layout { grid-template-columns: 1fr; }
    .login-story { display: none; }
    .mobile-brand { display: grid; }
    .login-card-wrap { min-height: 100vh; }
}

@media (max-width: 620px) {
    .content { padding: .8rem; }
    .topbar { padding: .8rem; }
    .topbar .button:not(.language-switch) { display: none; }
    .nav-list { overflow-x: auto; grid-template-columns: repeat(4, minmax(110px,1fr)); }
    .page-heading, .welcome-band, .ticket-hero { align-items: stretch; flex-direction: column; }
    .metric-grid, .form-grid, .rating-form, .creation-choice-grid { grid-template-columns: 1fr; }
    .ticket-summary-grid { grid-template-columns: 1fr 1fr; }
    .ticket-row { grid-template-columns: 1fr auto; }
    .ticket-row .ticket-ref { grid-column: 1 / -1; }
    .ticket-row .badge:nth-last-child(2) { display: none; }
    .filter-form, .inline-action-form, .comment-form { align-items: stretch; flex-direction: column; }
    .filter-form .field, .filter-form .field:not(.grow), .inline-action-form .field:first-of-type, .visibility-field { width: 100%; min-width: 0; }
    .form-grid .span-two, .rating-form .span-two { grid-column: auto; }
    .ticket-title-line { align-items: flex-start; flex-direction: column; }
    .ticket-hero-actions { justify-items: start; }
    .inspection-list article { grid-template-columns: 1fr; }
    .login-card-wrap { padding: .8rem; }
    .login-card { padding: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
