:root {
  --bg: #ece8dc;
  --bg-2: #ded8c8;
  --surface: #fffdf6;
  --surface-raised: #f7f2e7;
  --surface-field: #fff9ee;
  --ink: #171d19;
  --ink-2: #2d352c;
  --muted: #6f7467;
  --line: #d8cfbe;
  --line-strong: #bfb39e;
  --brand: #6f7352;
  --brand-dark: #2b3428;
  --brand-soft: #d9d4c3;
  --action: #a8643d;
  --action-dark: #85482e;
  --gold: #8e855e;
  --danger: #a8433c;
  --warning: #a8782f;
  --ok: #2f6b4f;
  --info: #365f7a;
  --shadow-soft: 0 14px 34px rgba(35, 31, 25, 0.11);
  --shadow-tight: 0 6px 18px rgba(35, 31, 25, 0.10);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% -10%, rgba(142, 133, 94, 0.18), transparent 28%),
    linear-gradient(90deg, rgba(43, 52, 40, 0.052) 1px, transparent 1px),
    linear-gradient(180deg, rgba(43, 52, 40, 0.044) 1px, transparent 1px),
    linear-gradient(180deg, #f2eee3 0, #e5decd 56%, #f5f1e8 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

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

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 16px 18px 40px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 -6px 18px;
  padding: 10px 10px;
  border: 1px solid rgba(24, 33, 31, 0.12);
  border-radius: 14px;
  background: rgba(255, 253, 246, 0.9);
  box-shadow: 0 14px 36px rgba(44, 38, 28, 0.09);
  backdrop-filter: blur(14px);
}

.session-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.session-actions span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid rgba(142, 133, 94, 0.28);
  border-radius: 12px;
  background: #dedbcf;
  box-shadow: 0 8px 18px rgba(44, 38, 28, 0.08);
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.1;
}

.brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.05em;
  letter-spacing: 0;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #e8dfcf;
}

.tab {
  min-height: 38px;
  padding: 0 14px;
  color: #5c625d;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 800;
}

.tab.is-active {
  color: #fffaf2;
  background: var(--brand-dark);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.login-panel {
  position: relative;
  width: min(460px, 100%);
  margin: clamp(42px, 8vh, 86px) auto 0;
  display: grid;
  gap: 20px;
  padding: clamp(24px, 4vw, 34px);
  border: 1px solid rgba(191, 179, 158, 0.82);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 253, 246, 0.97), rgba(248, 242, 231, 0.95)),
    var(--surface);
  box-shadow: 0 24px 70px rgba(43, 52, 40, 0.12);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(142, 133, 94, 0.13);
  border-radius: 15px;
  pointer-events: none;
}

.login-brand-card {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 253, 246, 0.28);
  border-radius: 16px;
  color: #fffdf6;
  background:
    linear-gradient(180deg, rgba(29, 33, 25, 0.04) 0%, rgba(29, 33, 25, 0.58) 100%),
    url("assets/key-urla-property.png") center / cover;
}

.login-brand-card img {
  position: absolute;
  top: 24px;
  width: 136px;
  height: 136px;
  object-fit: cover;
  border: 1px solid rgba(255, 253, 246, 0.28);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.login-brand-card span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.login-copy,
.login-access-card {
  min-width: 0;
}

.login-copy {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.login-mark {
  width: 72px;
  height: 72px;
  object-fit: cover;
  margin-bottom: 4px;
  border: 1px solid rgba(142, 133, 94, 0.28);
  border-radius: 14px;
  background: #dedbcf;
}

.login-copy h1 {
  margin: 0;
  max-width: 360px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 45px);
  font-weight: 500;
  letter-spacing: 0;
}

.login-copy .lead {
  margin: 2px 0 0;
  max-width: 340px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.login-access-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.login-form {
  display: grid;
  gap: 12px;
  max-width: none;
  margin-top: 0;
}

.login-hint {
  display: block;
  margin-top: 12px;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.login-hint span,
.muted-line {
  color: var(--muted);
  font-size: 13px;
}

.login-card {
  display: grid;
  gap: 11px;
  min-height: 160px;
  padding: 18px;
  color: var(--ink);
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.login-card:hover,
.login-card:focus-visible {
  border-color: var(--action);
  box-shadow: 0 0 0 4px rgba(169, 95, 62, 0.14);
  outline: 0;
}

.login-card svg {
  width: 30px;
  height: 30px;
  color: var(--action);
}

.login-card strong,
.login-card span {
  display: block;
}

.login-card strong {
  font-size: 18px;
}

.login-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.seed-button {
  margin-top: 14px;
}

.staff-layout {
  display: grid;
  grid-template-columns: minmax(320px, 520px);
  justify-content: center;
  align-items: start;
}

.request-panel {
  position: relative;
  min-height: calc(100vh - 112px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #161f1d;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 22px 54px rgba(24, 33, 31, 0.20);
}

.request-panel::before {
  content: "";
  display: block;
  height: 18px;
  background: var(--brand-dark);
}

.request-panel h1,
.request-panel .lead,
.request-panel .ticket-form {
  margin-left: 26px;
  margin-right: 26px;
}

.request-panel h1 {
  margin-top: 30px;
}

.request-panel .lead {
  margin-bottom: 22px;
}

.status-strip,
.report-table-wrap {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-soft);
}

.kicker {
  color: var(--action);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 6px 0 8px;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

.request-panel h1 {
  font-size: clamp(30px, 7vw, 42px);
}

.lead {
  max-width: 560px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.ticket-form {
  display: grid;
  gap: 15px;
  padding-bottom: 28px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 900;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface-field);
  color: var(--ink);
  outline: 0;
}

input,
select {
  min-height: 54px;
  padding: 0 14px;
}

textarea {
  min-height: 146px;
  resize: vertical;
  padding: 14px;
  line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--action);
  box-shadow: 0 0 0 4px rgba(169, 95, 62, 0.14);
}

.form-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
}

.photo-picker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-button,
.ghost-button,
.alert-toggle,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
}

.photo-button,
.ghost-button {
  padding: 0 14px;
  color: var(--brand-dark);
  border: 1px solid var(--line-strong);
  background: #f4ecde;
}

.photo-button:hover,
.ghost-button:hover {
  background: #efe2d0;
}

.photo-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-preview img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.primary-action {
  width: 100%;
  min-height: 60px;
  padding: 0 18px;
  color: #fffaf2;
  border: 0;
  background: var(--action);
  box-shadow: 0 12px 22px rgba(169, 95, 62, 0.24);
}

.primary-action:hover,
.tab.is-active:hover {
  background: var(--action-dark);
}

.primary-action.small {
  width: auto;
  min-height: 44px;
  padding: 0 14px;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-tight);
}

.workspace-head h1 {
  margin-bottom: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  font-weight: 900;
}

.panel-title .ghost-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

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

.staff-ticket-history {
  display: grid;
  gap: 18px;
  padding: 0 18px 22px;
}

.staff-ticket-history h2 {
  margin: 8px 0 12px;
  color: #fffaf2;
  font-size: 18px;
}

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

.ticket-card {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-tight);
}

.ticket-card-inner {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ticket-operational-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.ticket-code,
.sla-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.ticket-code {
  color: #fffaf2;
  background: var(--brand-dark);
}

.ticket-code.table-code {
  margin-bottom: 6px;
}

.sla-pill {
  color: #61552d;
  border: 1px solid rgba(168, 120, 47, 0.28);
  background: #f1dfaa;
}

.sla-pill.is-paused {
  color: #4c3f27;
  border-color: rgba(133, 105, 56, 0.35);
  background: #ead5a5;
}

.sla-pill.is-overdue {
  color: #fffaf2;
  border-color: rgba(168, 67, 60, 0.34);
  background: var(--danger);
}

.ticket-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.ticket-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.compact .ticket-title {
  font-size: 15px;
}

.ticket-meta,
.ticket-desc,
.ticket-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ticket-desc {
  margin: 0;
  color: #424b47;
  font-size: 15px;
  line-height: 1.55;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.badge.open {
  color: #fffaf2;
  background: var(--danger);
}

.badge.progress {
  color: #4f3512;
  background: #f2d998;
}

.badge.waiting {
  color: #fffaf2;
  background: #75694f;
}

.badge.closed {
  color: #173e2e;
  background: #cde3d5;
}

.badge.reopened {
  color: #fffaf2;
  background: var(--info);
}

.badge.staff_action {
  color: #173e2e;
  background: #d9f3e4;
}

.badge.approval {
  color: #4f3512;
  background: #f3d28a;
}

.badge.cancelled {
  color: #fffaf2;
  background: #77716a;
}

.badge.planned-planned {
  color: #65410a;
  background: #f7d68c;
}

.badge.planned-started,
.badge.planned-progress {
  color: #65410a;
  background: #ffe8ad;
}

.badge.planned-review {
  color: #0f4f42;
  background: #d7f3e2;
}

.badge.planned-completed {
  color: #0f4f42;
  background: #cfe9dc;
}

.ticket-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #eee6d9;
}

.ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.ticket-actions.single {
  grid-template-columns: 1fr;
}

.action-button {
  min-height: 42px;
  padding: 0 10px;
  color: var(--brand-dark);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #f4ecde;
  font-weight: 900;
}

.action-button.resolve {
  color: #fffaf2;
  border-color: var(--ok);
  background: var(--ok);
}

.action-button.hold-action,
.resume-action {
  color: #fffaf2;
  border-color: #75694f;
  background: #75694f;
}

.hold-box {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5efe3;
}

.hold-box select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--brand-dark);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fffaf2;
}

.waiting-summary {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  color: #4c3f27;
  border-left: 4px solid #8c744a;
  border-radius: 8px;
  background: #eee3c9;
}

.waiting-summary span,
.waiting-summary small,
.waiting-note {
  color: #665a42;
}

.sla-report {
  font-size: 12px;
  font-weight: 900;
  color: var(--ok);
}

.sla-report.is-overdue {
  color: var(--danger);
}

.action-button.danger {
  color: #fffaf2;
  border-color: var(--danger);
  background: var(--danger);
}

.action-button[disabled] {
  cursor: default;
  opacity: 0.55;
}

.resolution-box {
  display: none;
  gap: 8px;
}

.resolution-box.is-open {
  display: grid;
}

.staff-action-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #f6f1e8;
}

.staff-action-box strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.planned-tech-section {
  margin-top: 18px;
}

.planned-note-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.planned-note {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffaf2;
}

.planned-note p {
  margin: 6px 0 0;
}

.planned-note img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  margin-top: 8px;
  border-radius: 10px;
}

.resolution-box textarea {
  min-height: 82px;
}

.reopen-box {
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #f6f1e8;
}

.mini-label {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 900;
}

.resolution-photo-picker {
  display: grid;
  gap: 8px;
}

.resolution-photo-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.resolution-photo-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--brand-dark);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: #fffaf2;
  font-size: 14px;
  font-weight: 900;
}

.resolution-photo-preview {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.resolution-photo-preview img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ticket-detail-page {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: auto;
  padding: 18px;
  background:
    linear-gradient(rgba(239, 233, 222, 0.94), rgba(239, 233, 222, 0.94)),
    repeating-linear-gradient(90deg, rgba(31, 51, 47, 0.07) 0 1px, transparent 1px 52px),
    repeating-linear-gradient(0deg, rgba(31, 51, 47, 0.06) 0 1px, transparent 1px 52px);
}

.ticket-detail-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.ticket-detail-head,
.ticket-detail-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-tight);
}

.ticket-detail-head h1,
.ticket-detail-summary h2 {
  margin: 2px 0 0;
  color: var(--ink);
  line-height: 1.08;
}

.ticket-detail-head h1 {
  color: var(--action);
}

.ticket-detail-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.ticket-detail-summary p {
  margin: 8px 0 0;
  color: #424b47;
  line-height: 1.55;
}

.ticket-timeline {
  display: grid;
  gap: 12px;
}

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

.timeline-dot {
  width: 12px;
  height: 12px;
  margin: 18px auto 0;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(25, 132, 115, 0.16);
}

.timeline-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fffaf2;
  box-shadow: var(--shadow-tight);
}

.timeline-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.timeline-head strong {
  color: var(--ink);
  font-size: 17px;
}

.timeline-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.timeline-card p {
  margin: 8px 0 0;
  color: #424b47;
  line-height: 1.5;
}

.timeline-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.timeline-card figure {
  margin: 12px 0 0;
}

.timeline-card img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.timeline-card figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.alert-toggle {
  min-width: 132px;
  padding: 0 14px;
  color: #fffaf2;
  border: 0;
  background: var(--brand-dark);
}

.alert-toggle.is-on {
  background: var(--action);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.request-card {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-tight);
}

.tech-create-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 14px;
}

.tech-create-toolbar .primary-action {
  width: auto;
}

.tech-section-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
}

.tech-section-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 104px;
  padding: 18px;
  color: var(--ink);
  border: 1px solid rgba(196, 178, 151, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(245, 236, 222, 0.9));
  box-shadow: var(--shadow-tight);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.tech-section-card:hover {
  border-color: var(--action);
  box-shadow: 0 18px 38px rgba(70, 55, 35, 0.15);
  transform: translateY(-1px);
}

.tech-section-card.is-active {
  border-color: var(--action);
  background:
    linear-gradient(135deg, #fffaf2, #efe1cf);
  box-shadow: inset 0 0 0 1px rgba(180, 101, 63, 0.16), var(--shadow-tight);
}

.tech-section-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #fffaf2;
  border-radius: 14px;
  background: var(--pine);
}

.tech-section-card.is-active .tech-section-icon {
  background: var(--action);
}

.tech-section-card strong,
.tech-section-card small {
  display: block;
}

.tech-section-card strong {
  font-size: 21px;
  line-height: 1.08;
}

.tech-section-card small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tech-work-section {
  margin-bottom: 14px;
}

.ticket-actions .start-action {
  width: 100%;
  min-height: 42px;
  box-shadow: none;
}

.collapsible-request {
  animation: panelIn 160ms ease-out;
}

.small-ghost {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.inline-ticket-form,
.management-form {
  display: grid;
  gap: 10px;
}

.inline-ticket-form textarea {
  min-height: 96px;
}

.compact-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.split-layout,
.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.admin-dashboard-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.75fr);
  margin-bottom: 14px;
}

.admin-home,
.admin-section {
  display: grid;
  gap: 14px;
}

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

.admin-module-card {
  display: grid;
  min-height: 168px;
  padding: 18px;
  color: var(--brand-dark);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: var(--shadow-tight);
  text-align: left;
}

.admin-module-card:hover {
  border-color: var(--action);
  transform: translateY(-1px);
}

.admin-module-card span {
  align-self: start;
  width: max-content;
  padding: 5px 9px;
  color: #fffaf2;
  border-radius: 999px;
  background: var(--brand-dark);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-module-card strong {
  align-self: end;
  font-size: 22px;
  line-height: 1.1;
}

.admin-module-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}

.admin-section-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-tight);
}

.admin-section-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.05;
}

.admin-section-head .action-button {
  min-width: 86px;
}

.admin-filterbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.admin-filterbar label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-filterbar select {
  min-width: 220px;
}

.performance-card {
  grid-column: 1 / -1;
}

.user-list,
.performance-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.permissions-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 250, 242, 0.72);
}

.permission-group {
  display: grid;
  gap: 8px;
  align-content: start;
}

.permission-group strong {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
}

.permission-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid rgba(206, 190, 164, 0.72);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
}

.permission-check input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: var(--forest);
}

.user-row,
.performance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf2;
}

.user-row span,
.performance-row span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.report-chart,
.report-rank-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ticket-day-card .panel-title {
  margin-bottom: 10px;
}

.ticket-day-chart {
  display: flex;
  gap: 12px;
  align-items: end;
  min-height: 172px;
  overflow-x: auto;
  padding: 12px 6px 4px;
  border-bottom: 1px solid var(--line-strong);
}

.ticket-day-column {
  display: grid;
  grid-template-rows: 20px 112px auto;
  gap: 7px;
  align-items: end;
  justify-items: center;
  min-width: 44px;
  padding: 0;
  color: var(--text);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ticket-day-column strong {
  font-size: 12px;
  opacity: 0;
  transition: 160ms ease;
}

.ticket-day-column i {
  display: block;
  width: 24px;
  min-height: 12px;
  border-radius: 999px;
  background: #ff9f43;
  transition: 160ms ease;
}

.ticket-day-column.is-empty i {
  width: 26px;
  height: 6px !important;
  min-height: 6px;
  background: rgba(111, 116, 103, 0.25);
}

.ticket-day-column span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  line-height: 1.15;
}

.ticket-day-column:hover strong,
.ticket-day-column.is-selected strong {
  opacity: 1;
}

.ticket-day-column:hover i,
.ticket-day-column.is-selected i {
  width: 26px;
  background: #e9670b;
}

.report-chart {
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffaf2;
}

.daily-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(206, 190, 164, 0.65);
}

.daily-status-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.daily-status-legend-item::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 4px;
  background: var(--status-color);
}

.daily-status-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  overflow-x: auto;
  padding: 4px 0 2px;
}

.daily-status-day {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 253, 246, 0.94), rgba(244, 238, 226, 0.9)),
    var(--surface);
  box-shadow: 0 12px 26px rgba(44, 38, 28, 0.07);
}

.daily-status-day-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.daily-status-day-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.daily-status-day-head strong {
  color: var(--brand-dark);
  font-size: 40px;
  line-height: 0.9;
  letter-spacing: 0;
}

.daily-status-track {
  display: flex;
  gap: 4px;
  width: 100%;
  height: 13px;
  padding: 2px;
  border: 1px solid rgba(191, 179, 158, 0.78);
  border-radius: 999px;
  background: rgba(255, 249, 238, 0.82);
}

.daily-status-track i {
  min-width: 8px;
  border-radius: 999px;
  background: var(--status-color);
}

.daily-status-track.is-empty {
  position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(111, 116, 103, 0.14) 0 10px, transparent 10px 18px),
    rgba(255, 249, 238, 0.82);
}

.daily-status-track.is-empty::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: rgba(111, 116, 103, 0.18);
}

.daily-status-breakdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.daily-status-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--muted);
  border: 1px solid rgba(191, 179, 158, 0.62);
  border-radius: 10px;
  background: rgba(255, 253, 246, 0.72);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.daily-status-chip strong {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  color: #fffaf2;
  border-radius: 8px;
  background: var(--status-color);
}

.daily-status-legend-item.open,
.daily-status-track .open,
.daily-status-chip.open {
  --status-color: #b4443f;
}

.daily-status-legend-item.progress,
.daily-status-track .progress,
.daily-status-chip.progress {
  --status-color: #d49b38;
}

.daily-status-legend-item.waiting,
.daily-status-track .waiting,
.daily-status-chip.waiting {
  --status-color: #75694f;
}

.daily-status-legend-item.reopened,
.daily-status-track .reopened,
.daily-status-chip.reopened {
  --status-color: #9a5fba;
}

.daily-status-legend-item.staff_action,
.daily-status-track .staff_action,
.daily-status-chip.staff_action {
  --status-color: #2f7b63;
}

.daily-status-legend-item.approval,
.daily-status-track .approval,
.daily-status-chip.approval {
  --status-color: #54748f;
}

.daily-status-legend-item.closed,
.daily-status-track .closed,
.daily-status-chip.closed {
  --status-color: #1f8b55;
}

.report-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffaf2;
}

.report-rank-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.user-row > .action-button {
  grid-row: span 2;
}

.admin-user-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.user-primary {
  display: grid;
  gap: 10px;
  align-items: start;
}

.admin-user-row .user-meta {
  justify-self: start;
}

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

.department-row .compact-action {
  justify-self: end;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 13px;
}

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

.metric {
  min-height: 108px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-tight);
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-actions select {
  min-width: 190px;
}

.report-table-wrap {
  overflow: auto;
}

.report-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

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

.report-table th {
  color: var(--muted);
  background: #f5eee3;
  font-size: 12px;
  text-transform: uppercase;
}

.empty-state {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 180px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 253, 248, 0.70);
  text-align: center;
}

.empty-state svg {
  width: 30px;
  height: 30px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 16px;
  color: #fffaf2;
  background: var(--brand-dark);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateY(10px);
  transition: 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .login-grid,
  .ticket-grid,
  .metrics,
  .admin-module-grid,
  .split-layout,
  .admin-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .staff-layout {
    align-items: stretch;
  }

  .request-panel {
    min-height: auto;
  }

  .status-strip {
    position: static;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px 10px 24px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin: 0 0 12px;
    padding: 12px;
  }

  .topbar .brand {
    padding: 0 2px;
  }

  .brand small {
    display: none;
  }

  .brand img {
    width: 42px;
    height: 42px;
  }

  .role-tabs {
    width: 100%;
    margin-top: 2px;
  }

  .session-actions {
    justify-content: space-between;
  }

  .tab {
    padding: 0 6px;
    font-size: 13px;
  }

  .staff-layout,
  .login-grid,
  .ticket-grid,
  .metrics,
  .admin-module-grid,
  .form-row,
  .split-layout,
  .admin-dashboard-grid,
  .compact-form,
  .user-row,
  .performance-row,
  .report-rank-row {
    grid-template-columns: 1fr;
  }

  .login-brand-card {
    min-height: 280px;
  }

  .login-brand-card img {
    width: 108px;
    height: 108px;
  }

  .report-chart {
    min-height: auto;
  }

  .daily-status-chart {
    grid-template-columns: 1fr;
  }

  .daily-status-day {
    padding: 12px;
  }

  .daily-status-breakdown {
    grid-template-columns: 1fr;
  }

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

  .workspace-head,
  .status-strip {
    padding: 18px;
  }

  .request-panel {
    border-radius: 22px;
  }

  .request-panel h1,
  .request-panel .lead,
  .request-panel .ticket-form {
    margin-left: 18px;
    margin-right: 18px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 15px;
  }

  .workspace-head,
  .admin-head,
  .admin-section-head,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-section-head {
    grid-template-columns: 1fr;
  }

  .admin-filterbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions select,
  .admin-actions .primary-action,
  .admin-filterbar select {
    width: 100%;
  }

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

  .ticket-detail-page {
    padding: 10px;
  }

  .ticket-detail-head,
  .ticket-detail-summary {
    grid-template-columns: 1fr;
  }

  .timeline-head {
    flex-direction: column;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }
}

/* Second-pass custom mobile operations surface */
.staff-layout {
  grid-template-columns: minmax(320px, 440px);
}

.request-panel {
  min-height: calc(100vh - 118px);
  color: var(--ink);
  border: 0;
  border-radius: 30px;
  background: #172522;
  box-shadow: 0 26px 64px rgba(18, 23, 22, 0.28);
}

.request-panel::before {
  display: none;
}

.request-panel h1,
.request-panel .lead,
.request-panel .ticket-form {
  margin-left: 0;
  margin-right: 0;
}

.request-hero {
  display: block;
  padding: 28px 24px 30px;
  color: #fffaf2;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.08), transparent 52%),
    #172522;
}

.request-hero h1 {
  max-width: none;
  margin: 8px 0 0;
  color: #fffaf2;
  font-size: clamp(28px, 5.3vw, 34px);
  line-height: 1.08;
  white-space: nowrap;
}

.screen-label {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  color: #e6b28f;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.request-panel .ticket-form {
  position: relative;
  gap: 12px;
  padding: 18px;
  border-radius: 26px 26px 0 0;
  background:
    linear-gradient(180deg, #f8f0e3, #f3eadc),
    #f3eadc;
}

.field-card {
  position: relative;
  display: block;
  padding: 14px 14px 14px 58px;
  border: 1px solid #d7c8b4;
  border-radius: 18px;
  background: #fffaf2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.field-card::before {
  content: attr(data-step);
  position: absolute;
  left: 14px;
  top: 15px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fffaf2;
  border-radius: 10px;
  background: #223530;
  font-size: 11px;
  font-weight: 900;
}

.field-card:focus-within {
  border-color: #a95f3e;
  box-shadow: 0 0 0 4px rgba(169, 95, 62, 0.13);
}

.field-card.is-disabled {
  opacity: 0.58;
  background: rgba(255, 250, 242, 0.58);
}

.field-card.is-disabled::before {
  background: #7b837e;
}

.field-card.is-disabled select {
  color: #7b837e;
}

.field-card span {
  margin-bottom: 7px;
  color: #667067;
  font-size: 12px;
  text-transform: uppercase;
}

.field-card input,
.field-card textarea,
.field-card select {
  min-height: 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #172522;
  font-size: 17px;
}

.field-card textarea {
  min-height: 104px;
  padding-top: 2px;
}

.field-card input:focus,
.field-card textarea:focus,
.field-card select:focus {
  box-shadow: none;
}

.request-panel .form-row {
  grid-template-columns: 1fr 1fr;
}

.request-panel .photo-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  padding: 14px;
  border: 1px dashed #c7b8a4;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.54);
}

.request-panel .photo-button {
  width: 100%;
  min-height: 52px;
  justify-content: flex-start;
  padding: 0 16px;
  border: 1px solid #cbb9a2;
  border-radius: 15px;
  background: #fffaf2;
  color: #223530;
}

.request-panel .photo-preview {
  min-height: 0;
}

.request-panel .primary-action {
  min-height: 62px;
  border-radius: 18px;
  background: #a95f3e;
  box-shadow: 0 16px 28px rgba(169, 95, 62, 0.24);
}

.request-panel .primary-action:hover {
  background: #87482f;
}

@media (max-width: 720px) {
  .request-panel {
    min-height: auto;
    border-radius: 26px;
  }

  .request-hero {
    padding: 24px 18px 28px;
  }

  .request-hero h1 {
    font-size: clamp(27px, 7.4vw, 32px);
  }

  .request-panel .ticket-form {
    padding: 16px;
  }

  .request-panel .form-row {
    grid-template-columns: 1fr;
  }
}

/* Operational clarity pass */
.role-tabs {
  grid-template-columns: repeat(var(--visible-nav-count, 4), minmax(0, 1fr));
}

.ticket-card {
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(35, 31, 25, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.ticket-card:hover {
  border-color: #c8b99f;
  box-shadow: 0 14px 30px rgba(35, 31, 25, 0.12);
  transform: translateY(-1px);
}

.ticket-photo {
  width: 100%;
  max-height: 230px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--surface-raised);
}

.ticket-card-inner {
  gap: 11px;
}

.ticket-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.ticket-context-owner {
  color: var(--ink-2);
  font-weight: 800;
}

.ticket-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.next-step-line {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-left: 3px solid var(--action);
  background: rgba(168, 100, 61, 0.07);
}

.next-step-line span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.next-step-line strong {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}

.ticket-card [data-ticket-detail] {
  color: var(--ink-2);
  background: transparent;
}

.ticket-card [data-ticket-detail]:hover {
  background: var(--surface-raised);
}

.ticket-detail-page {
  background: rgba(236, 232, 220, 0.97);
}

.ticket-detail-head {
  position: sticky;
  top: 0;
  z-index: 3;
  grid-template-columns: auto minmax(0, 1fr);
  border-radius: 10px;
  backdrop-filter: blur(16px);
}

.ticket-detail-summary {
  display: block;
  padding: 22px;
  border-radius: 10px;
}

.ticket-detail-summary-main {
  min-width: 0;
}

.ticket-detail-eyebrow,
.ticket-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ticket-detail-eyebrow {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ticket-detail-title-row {
  margin-top: 14px;
  align-items: flex-start;
}

.ticket-detail-title-row h2 {
  margin: 0;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: 0;
}

.ticket-detail-summary .ticket-detail-description {
  max-width: 760px;
  margin-top: 10px;
  font-size: 15px;
}

.ticket-detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.ticket-detail-facts > div {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 78px;
  padding: 13px;
  background: var(--surface-raised);
}

.ticket-detail-facts span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.ticket-detail-facts strong {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}

.ticket-detail-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px 0 34px;
}

.ticket-detail-section-title span {
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.ticket-detail-section-title small {
  color: var(--muted);
  font-weight: 800;
}

.ticket-timeline {
  position: relative;
}

.ticket-timeline::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 11px;
  width: 2px;
  background: #c9c2b2;
}

.timeline-item {
  z-index: 1;
}

.timeline-dot {
  background: var(--brand-dark);
  box-shadow: 0 0 0 5px #ded9cb;
}

.timeline-item.is-started .timeline-dot {
  background: var(--action);
}

.timeline-item.is-waiting .timeline-dot {
  background: var(--warning);
}

.timeline-item.is-completed .timeline-dot {
  background: var(--ok);
}

.timeline-item.is-reopened .timeline-dot {
  background: var(--info);
}

.timeline-card {
  border-radius: 10px;
  box-shadow: 0 5px 16px rgba(35, 31, 25, 0.07);
}

@media (max-width: 720px) {
  body {
    padding-bottom: 0;
  }

  .app-shell {
    padding-bottom: 34px;
  }

  .topbar .role-tabs:not([hidden]) {
    position: static;
    width: 100%;
    min-height: 54px;
    padding: 5px;
    border-color: rgba(43, 52, 40, 0.16);
    background: #ede5d7;
    box-shadow: inset 0 0 0 1px rgba(255, 253, 246, 0.54);
    backdrop-filter: none;
  }

  .topbar .role-tabs .tab {
    min-height: 44px;
    font-size: 12px;
  }

  .ticket-card:hover {
    transform: none;
  }

  .ticket-card-inner {
    padding: 14px;
  }

  .ticket-topline {
    align-items: flex-start;
  }

  .ticket-title {
    font-size: 17px;
  }

  .ticket-context {
    display: grid;
    justify-content: stretch;
  }

  .ticket-actions {
    gap: 8px;
  }

  .ticket-detail-page {
    padding: 0;
  }

  .ticket-detail-shell {
    gap: 10px;
  }

  .ticket-detail-head {
    top: 0;
    padding: 10px;
    border-width: 0 0 1px;
    border-radius: 0;
  }

  .ticket-detail-head h1 {
    font-size: 24px;
  }

  .ticket-detail-summary {
    margin: 0 10px;
    padding: 16px;
  }

  .ticket-detail-title-row {
    display: grid;
  }

  .ticket-detail-title-row h2 {
    font-size: 24px;
  }

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

  .ticket-detail-facts > div {
    min-height: 72px;
    padding: 11px;
  }

  .ticket-detail-section-title {
    padding: 6px 12px 0 44px;
  }

  .ticket-timeline {
    padding: 0 10px 18px;
  }

  .ticket-timeline::before {
    left: 21px;
  }

  .timeline-item {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 7px;
  }

  .timeline-card {
    padding: 13px;
  }

  .timeline-head {
    gap: 3px;
  }

  .timeline-head strong {
    font-size: 15px;
  }

  .timeline-card img {
    max-height: 300px;
  }
}

/* Staff task gateway */
.staff-entry {
  display: grid;
  gap: 14px;
  padding: 34px 24px;
  color: #fffaf2;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.07), transparent 55%),
    #172522;
}

.request-panel.is-gateway {
  display: grid;
  align-content: start;
}

.request-panel.is-gateway .staff-entry {
  padding-top: 72px;
  padding-bottom: 54px;
}

.staff-entry h1 {
  margin: 0 0 10px;
  color: #fffaf2;
  font-size: 30px;
  line-height: 1.1;
}

.staff-entry-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.staff-entry-button {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 15px;
  min-height: 106px;
  padding: 18px 20px;
  color: #22302c;
  border: 1px solid rgba(207, 139, 101, 0.34);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #fffdf8 0%, #f7efe4 100%);
  box-shadow: 0 18px 34px rgba(5, 18, 15, 0.18);
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.staff-entry-button:hover {
  border-color: #cf8b65;
  background: #fffdf8;
  box-shadow: 0 22px 42px rgba(5, 18, 15, 0.22);
  transform: translateY(-2px);
}

.staff-entry-button.is-active {
  border-color: #d69a75;
  background: #f5e5d5;
}

.staff-entry-button > span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.staff-entry-button strong {
  font-size: 20px;
  line-height: 1.05;
}

.staff-entry-button small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.staff-entry-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: #fffaf2;
  border-radius: 14px;
  background: var(--action);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.staff-entry-arrow {
  width: 20px;
  color: var(--muted);
}

.staff-section {
  scroll-margin-top: 92px;
}

.request-hero h2 {
  max-width: none;
  margin: 8px 0 0;
  color: #fffaf2;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
}

.staff-ticket-history {
  padding-top: 22px;
}

.staff-section-head {
  padding-bottom: 6px;
}

.staff-section-head h2 {
  margin: 6px 0 0;
  color: #fffaf2;
  font-size: 26px;
}

@media (max-width: 720px) {
  .staff-entry {
    padding: 28px 16px 22px;
  }

  .staff-entry h1 {
    font-size: 27px;
  }

  .request-panel.is-gateway .staff-entry {
    padding-top: 58px;
  }

  .staff-entry-button {
    min-height: 102px;
    padding: 16px;
  }

  .tech-section-switcher {
    grid-template-columns: 1fr;
  }

  .tech-section-card {
    min-height: 96px;
    padding: 16px;
  }

  .request-hero h2 {
    font-size: 27px;
  }
}
