:root {
  --accent: #b0124d;
  --accent-bright: #d6154f;
  --line: #e3e7ec;
  --panel: #ffffff;
  --surface: #f7f9fb;
  --muted: #667085;
  --text: #1f2933;
  --soft-red: #fff3f5;
  --shadow: 0 16px 40px rgba(31, 41, 51, 0.12);
  --card-shadow: 0 10px 26px rgba(31, 41, 51, 0.08);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--text);
  background: #eef2f6;
}

button,
input {
  font: inherit;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(176, 18, 77, 0.10), rgba(255, 255, 255, 0.42)),
    #eef2f6;
}

.login-card {
  width: min(380px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.login-brand {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-bottom: 20px;
}

.login-brand h1 {
  margin: 0;
  color: var(--accent-bright);
  font-size: 20px;
}

.login-card label {
  display: grid;
  gap: 5px;
  margin-bottom: 12px;
  color: #5d6570;
  font-size: 12px;
  font-weight: 700;
}

.login-card input {
  min-height: 34px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #fff;
}

.login-card button {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.login-card button:hover {
  background: var(--accent-bright);
}

.login-test-button {
  margin-top: 8px;
  color: var(--accent) !important;
  background: #fff !important;
}

.login-test-button:hover {
  background: #fff2f6 !important;
}

.login-version {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.top-banner {
  display: grid;
  grid-template-columns: 210px 128px 1fr 180px;
  min-height: 138px;
  background:
    linear-gradient(90deg, rgba(176, 18, 77, 0.08), rgba(255, 255, 255, 0.2)),
    #fff;
  gap: 10px;
  padding: 16px 18px 0;
}

.brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-self: center;
  min-height: 98px;
  margin-left: 0;
  padding: 10px 10px 8px;
  background: #fff;
  border: 1px solid rgba(214, 21, 79, 0.18);
  border-left: 6px solid var(--accent-bright);
  border-radius: 8px;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.demo-logo {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: center;
  align-self: center;
  min-width: 124px;
  min-height: 38px;
  border: 1px solid rgba(13, 20, 33, 0.88);
  border-radius: 8px;
  padding: 5px 10px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(214, 21, 79, 0.95), rgba(214, 21, 79, 0.78) 36%, transparent 36%),
    #111827;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  overflow: hidden;
}

.demo-logo::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #fff;
  border-right-color: rgba(255, 255, 255, 0.36);
  border-bottom-color: rgba(255, 255, 255, 0.36);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.12);
}

.demo-logo::after {
  content: "";
  position: absolute;
  right: 9px;
  bottom: 7px;
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: #d6154f;
  box-shadow:
    -14px -8px 0 rgba(255, 255, 255, 0.22),
    10px -16px 0 rgba(255, 255, 255, 0.18);
}

.brand-mark {
  color: var(--accent-bright);
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  margin-top: 14px;
}

.main-nav,
.service-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-self: start;
  min-height: 108px;
  padding: 9px 9px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(227, 231, 236, 0.9);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(31, 41, 51, 0.06);
}

.main-nav a,
.service-links a {
  color: #505761;
  font-size: 11px;
  text-decoration: none;
  border-radius: 5px;
  padding: 3px 6px;
  transition:
    background 0.16s ease,
    color 0.16s ease;
}

.hero-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  min-height: 108px;
}

.hero-tile {
  background-size: cover;
  background-position: center;
  filter: grayscale(0.85) contrast(0.96);
  border-radius: 8px;
  opacity: 0.9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.tile-one {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(176, 18, 77, 0.08)),
    url("assets/header-service.png");
}

.tile-two {
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(176, 18, 77, 0.08)),
    url("assets/header-devices.png");
}

.user-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  padding: 0 18px 0 238px;
  color: #fff;
  background: linear-gradient(90deg, #9f1246, #c01855);
  border-left: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
  box-shadow: 0 8px 18px rgba(176, 18, 77, 0.22);
}

.bar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bar-actions button,
.detail-actions button {
  border: 1px solid transparent;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  padding: 3px 7px;
}

.bar-actions button:hover,
.detail-actions button:hover {
  background: rgba(176, 18, 77, 0.08);
  border-color: rgba(176, 18, 77, 0.16);
}

.search {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.search input {
  width: 220px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  padding: 3px 9px;
  box-shadow: inset 0 1px 2px rgba(31, 41, 51, 0.12);
}

.search-results {
  position: absolute;
  top: 40px;
  right: 22px;
  z-index: 5;
  width: 300px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.18);
  overflow: hidden;
}

.search-result {
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e4e6e8;
  padding: 7px 9px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus {
  outline: none;
  background: var(--soft-red);
}

.search-result strong {
  font-size: 12px;
}

.search-result span,
.search-empty {
  color: var(--muted);
  font-size: 11px;
}

.search-result small {
  color: #6c7580;
  font-size: 10px;
  line-height: 1.3;
}

.search-empty {
  padding: 8px 9px;
}

.workspace {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  gap: 24px;
  padding: 20px 22px 44px;
}

.workspace.list-mode {
  grid-template-columns: minmax(0, 1fr);
  padding-left: 16px;
  padding-right: 16px;
}

.ticket-column,
.action-column {
  align-self: start;
  padding: 18px 14px;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ticket-column {
  border-right: 1px solid var(--line);
}

.action-column {
  border-left: 1px solid var(--line);
}

.ticket-column h2,
.action-column h2 {
  margin: 6px 0 18px;
  color: var(--accent-bright);
  font-size: 16px;
  font-weight: 600;
}

.ticket-column h2 {
  color: #4c5560;
  font-size: 11px;
}

.ticket {
  margin-bottom: 12px;
  padding: 10px;
  color: #46515d;
  font-size: 11px;
  line-height: 1.25;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.ticket-clickable {
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.ticket-clickable:hover,
.ticket-clickable:focus {
  outline: none;
  border-color: rgba(176, 18, 77, 0.32);
  box-shadow: 0 8px 18px rgba(31, 41, 51, 0.1);
  transform: translateY(-1px);
}

.ticket strong,
.ticket a {
  color: #26333f;
  font-weight: 700;
}

.ticket-card-message {
  display: grid;
  gap: 3px;
}

.ticket-card-message span {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket .state-done {
  color: #677500;
  font-weight: 700;
}

.ticket .state-open {
  color: #005ca8;
}

.contract-panel {
  padding: 0;
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 2px;
}

.section-heading p,
.section-heading h1 {
  margin: 0;
  color: var(--accent-bright);
  font-weight: 600;
}

.section-heading h1 {
  color: var(--muted);
  font-size: 14px;
}

.tabs {
  display: flex;
  justify-content: safe center;
  gap: 6px;
  margin-bottom: 8px;
  padding-left: 0;
}

.tabs button {
  min-width: 90px;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-size: 11px;
}

.tabs button.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}

.detail-card {
  min-height: 426px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 18px 18px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.create-card {
  min-height: 426px;
  max-width: 620px;
  margin: 42px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 18px 18px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.list-card {
  min-height: 426px;
  margin-top: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px 18px 18px;
  background: #fff;
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

.ticket-overview-card,
.handypool-card,
.leasing-overview-card {
  min-height: 426px;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  overflow-x: auto;
  box-shadow: var(--card-shadow);
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.detail-head h2 {
  margin: 0;
  color: var(--accent-bright);
  font-size: 16px;
  font-weight: 600;
}

.detail-card .detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.detail-card .detail-head::before {
  content: "";
}

.detail-card .detail-head h2 {
  text-align: center;
}

.detail-card .status-pill {
  justify-self: end;
}

.status-pill {
  min-width: 64px;
  padding: 5px 10px;
  color: #375000;
  background: #eef7dc;
  border: 1px solid #cfe2a5;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(180px, 1.4fr);
  gap: 1px;
  max-width: 500px;
  margin: 0 auto;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.detail-grid dt,
.detail-grid dd {
  min-height: 15px;
  margin: 0;
  padding: 5px 7px;
  background: #f3f5f7;
}

.detail-grid dt {
  color: #5d6570;
  font-weight: 700;
  text-decoration: none;
  background: #e9edf2;
}

.detail-grid .detail-section-title,
.detail-grid .detail-section-spacer {
  margin-top: 12px;
  color: var(--accent-bright);
  background: #fff2f6;
  font-weight: 700;
}

.detail-grid .detail-section-spacer {
  display: flex;
  justify-content: flex-end;
  color: var(--accent-bright);
}

.device-delete-button {
  min-height: 24px;
  border: 1px solid rgba(176, 18, 77, 0.28);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--accent);
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.device-delete-button:hover {
  border-color: var(--accent);
  background: #fff8fa;
}

.leasing-history-panel {
  max-width: 860px;
  margin: 14px auto 0;
}

.leasing-history-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.leasing-history-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.leasing-history-block h3 {
  margin: 0 0 8px;
  color: var(--accent-bright);
  font-size: 13px;
}

.leasing-history-block ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.leasing-history-block li {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr);
  gap: 10px;
  padding: 9px;
  border-radius: 6px;
  background: #f3f5f7;
  font-size: 11px;
}

.leasing-history-meta {
  display: grid;
  align-content: start;
  gap: 3px;
  color: var(--muted);
  line-height: 1.25;
}

.leasing-history-meta span {
  color: var(--text);
  font-weight: 700;
}

.leasing-history-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.leasing-history-content strong {
  color: var(--accent-bright);
  font-size: 12px;
}

.leasing-history-content span {
  color: #3f4650;
  overflow-wrap: anywhere;
}

.leasing-history-content b {
  color: #67717e;
  font-weight: 700;
}

.leasing-history-empty {
  grid-template-columns: 1fr !important;
  color: var(--muted);
}

.detail-input {
  width: 100%;
  height: 24px;
  border: 1px solid #c9d0d8;
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--text);
  background: #fff;
  font-size: 11px;
}

.detail-input:focus {
  outline: 2px solid rgba(176, 18, 77, 0.24);
  border-color: var(--accent);
}

.document-panel {
  max-width: 500px;
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
  font-size: 11px;
}

.document-panel-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.document-panel h3 {
  margin: 0;
  color: var(--accent-bright);
  font-size: 13px;
}

.document-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.document-upload-form input {
  max-width: 320px;
  min-height: 28px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 3px;
  background: #fff;
}

.document-upload-form button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--text);
  background: #fff;
  cursor: pointer;
}

.document-upload-form button:hover {
  border-color: rgba(176, 18, 77, 0.28);
  color: var(--accent);
}

.document-list {
  display: grid;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.document-list li {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2f5;
}

.document-list a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.document-list a:hover {
  text-decoration: underline;
}

.document-list span,
.document-empty {
  color: #5d6570;
}

.document-delete-button {
  min-height: 26px;
  border: 1px solid rgba(176, 18, 77, 0.28);
  border-radius: 6px;
  padding: 3px 8px;
  color: var(--accent);
  background: #fff;
  cursor: pointer;
}

.document-delete-button:hover {
  background: #fff2f6;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(170px, 1fr));
  gap: 10px 14px;
  max-width: 520px;
  margin-inline: auto;
}

.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #5d6570;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.form-grid input,
.form-grid select {
  min-height: 26px;
  border: 1px solid #aeb4ba;
  border-radius: 6px;
  padding: 4px 6px;
  color: var(--text);
  background: #f7f7f7;
  font-size: 12px;
  text-decoration: none;
}

.form-grid input:focus,
.form-grid select:focus {
  outline: 2px solid rgba(176, 18, 77, 0.24);
  border-color: var(--accent);
  background: #fff;
}

.form-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--accent-bright);
  font-size: 12px;
}

.form-error.is-info {
  color: #35516b;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  max-width: 500px;
  margin: 12px auto 0;
  color: #5d6570;
  font-size: 11px;
}

.save-feedback {
  margin-right: auto;
  color: #375000;
  font-weight: 700;
}

.save-feedback.is-error {
  color: #b0124d;
}

.create-actions {
  max-width: 520px;
  justify-content: flex-start;
}

#createError:empty {
  display: none;
}

.record-table {
  min-width: 1080px;
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.record-count {
  color: var(--muted);
  font-size: 11px;
}

.record-table th,
.record-table td {
  border-bottom: 1px solid #fff;
  padding: 7px 8px;
  background: #f3f5f7;
  text-align: left;
  vertical-align: top;
}

.record-table th {
  color: #5d6570;
  font-weight: 700;
  text-decoration: none;
  background: #e9edf2;
  position: sticky;
  top: 0;
}

.demo-logo.is-customer-logo {
  color: #f8fafc;
  background: linear-gradient(135deg, #146c5f, #1f8a70);
}

.demo-logo.is-blb-logo {
  display: flex;
  grid-template-columns: none;
  justify-content: center;
  min-width: 168px;
  min-height: 112px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.demo-logo.is-blb-logo::before,
.demo-logo.is-blb-logo::after {
  content: none;
}

.demo-logo.is-blb-logo img {
  display: block;
  width: 168px;
  height: auto;
  max-height: 112px;
  object-fit: contain;
}

.contract-pool-table {
  min-width: 900px;
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 11px;
}

.contract-pool-table th,
.contract-pool-table td {
  border-bottom: 1px solid #fff;
  padding: 7px 8px;
  background: #f3f5f7;
  text-align: left;
  vertical-align: top;
}

.contract-pool-table th {
  color: #5d6570;
  font-weight: 700;
  background: #e9edf2;
}

.contract-pool-action {
  min-height: 26px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 3px 8px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.contract-pool-action:disabled {
  opacity: 0.65;
  cursor: wait;
}

.return-delivery-table {
  min-width: 1040px;
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}

.return-delivery-table th,
.return-delivery-table td {
  border-bottom: 1px solid #fff;
  padding: 7px 6px;
  background: #f3f5f7;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.return-delivery-table th {
  color: #5d6570;
  font-weight: 700;
  background: #e9edf2;
}

.return-delivery-card {
  min-width: 0;
  overflow-x: auto;
}

.return-delivery-table th:nth-child(1),
.return-delivery-table td:nth-child(1) {
  width: 7%;
}

.return-delivery-table th:nth-child(2),
.return-delivery-table td:nth-child(2) {
  width: 10.5%;
}

.return-delivery-table th:nth-child(3),
.return-delivery-table td:nth-child(3) {
  width: 9%;
}

.return-delivery-table th:nth-child(4),
.return-delivery-table td:nth-child(4) {
  width: 10%;
}

.return-delivery-table th:nth-child(5),
.return-delivery-table td:nth-child(5),
.return-delivery-table th:nth-child(7),
.return-delivery-table td:nth-child(7) {
  width: 7%;
}

.return-delivery-table th:nth-child(6),
.return-delivery-table td:nth-child(6),
.return-delivery-table th:nth-child(8),
.return-delivery-table td:nth-child(8) {
  width: 9%;
}

.return-delivery-table th:nth-child(9),
.return-delivery-table td:nth-child(9) {
  width: 13.5%;
}

.return-delivery-table th:nth-child(10),
.return-delivery-table td:nth-child(10) {
  width: 18%;
}

.return-delivery-table td:nth-child(1),
.return-delivery-table td:nth-child(3),
.return-delivery-table td:nth-child(4),
.return-delivery-table td:nth-child(5),
.return-delivery-table td:nth-child(6),
.return-delivery-table td:nth-child(7),
.return-delivery-table td:nth-child(8) {
  white-space: nowrap;
}

.record-link {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
}

.record-link:hover,
.record-link:focus {
  outline: none;
  text-decoration: underline;
}

.reporting-card,
.history-card {
  max-width: 720px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.handypool-card {
  overflow-x: auto;
}

.handypool-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 14px;
}

.handypool-actions button {
  min-height: 30px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 12px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.handypool-actions button:hover {
  background: var(--accent-bright);
}

.handypool-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.handypool-edit-button,
.handypool-delete-button {
  min-height: 24px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 2px 8px;
  color: #394553;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.handypool-edit-button:hover,
.handypool-delete-button:hover {
  border-color: rgba(176, 18, 77, 0.28);
  color: var(--accent);
}

.history-card {
  max-width: none;
  overflow-x: auto;
}

.reporting-card {
  max-width: none;
  width: 100%;
  padding: 20px;
}

.reporting-export-hint {
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.leasing-overview-card {
  width: 100%;
  padding: 20px;
}

.leasing-overview-card .detail-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.leasing-overview-filters {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(180px, 0.8fr) minmax(170px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.leasing-overview-filters label {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #5d6570;
  font-size: 11px;
  font-weight: 700;
}

.leasing-overview-filters input,
.leasing-overview-filters select {
  min-height: 32px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  font-size: 12px;
}

.leasing-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.leasing-overview-actions button,
.leasing-action-grid button {
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 12px;
  color: var(--accent);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.leasing-overview-actions button:first-child,
.leasing-action-grid button:first-child {
  color: #fff;
  background: var(--accent);
}

.leasing-overview-actions button:hover,
.leasing-action-grid button:hover {
  background: #fff8fa;
}

.leasing-overview-actions button:first-child:hover,
.leasing-action-grid button:first-child:hover {
  background: var(--accent-bright);
}

.leasing-overview-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1.5fr) minmax(340px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.leasing-device-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.leasing-device-row {
  display: grid;
  grid-template-columns: 44px minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(96px, 0.5fr) minmax(120px, 0.6fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.leasing-device-row:hover,
.leasing-device-row.is-active {
  border-color: rgba(176, 18, 77, 0.35);
  background: #fff8fa;
}

.leasing-device-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  color: var(--accent);
  background: #f3f5f7;
  font-size: 11px;
  font-weight: 800;
}

.leasing-device-main,
.leasing-device-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.leasing-device-main strong,
.leasing-device-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leasing-device-main small,
.leasing-device-meta small {
  color: var(--muted);
  font-size: 11px;
}

.leasing-device-main .leasing-link-ok {
  color: #327a42;
  font-weight: 700;
}

.leasing-device-main .leasing-link-missing {
  color: #9a6a00;
  font-weight: 700;
}

.leasing-required-missing {
  color: #b0124d;
  font-weight: 800;
}

.leasing-device-rate {
  font-weight: 700;
  white-space: nowrap;
}

.leasing-row-status,
.leasing-status-badge {
  width: fit-content;
  max-width: 100%;
  border: 1px solid #d8dee6;
  border-radius: 999px;
  padding: 5px 8px;
  color: #3f4650;
  background: #f3f5f7;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.leasing-device-detail {
  position: sticky;
  top: 14px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.leasing-detail-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.leasing-detail-head p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.leasing-detail-head h3,
.leasing-current-tickets h4,
.leasing-empty-detail h3 {
  margin: 0;
  color: var(--accent-bright);
  font-size: 15px;
}

.leasing-detail-list {
  display: grid;
  grid-template-columns: minmax(116px, 0.7fr) minmax(160px, 1fr);
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 11px;
}

.leasing-detail-list dt,
.leasing-detail-list dd {
  min-height: 24px;
  margin: 0;
  padding: 6px 8px;
  background: #f3f5f7;
}

.leasing-detail-list dt {
  color: #5d6570;
  background: #e9edf2;
  font-weight: 700;
}

.leasing-detail-list dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.leasing-current-tickets {
  display: grid;
  gap: 8px;
}

.leasing-ticket-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  color: var(--text);
  background: #f9fbfc;
  text-align: left;
  cursor: pointer;
}

.leasing-ticket-row strong {
  color: var(--accent);
  font-size: 11px;
}

.leasing-ticket-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
}

.leasing-detail-muted,
.leasing-empty-detail p,
.leasing-detail-note,
.leasing-empty-list {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.leasing-detail-note,
.leasing-empty-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #f9fbfc;
}

.user-management-card {
  max-width: none;
  min-width: 0;
  width: 100%;
  margin-inline: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--card-shadow);
}

.user-create-form {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.user-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #5d6570;
  font-size: 11px;
  font-weight: 700;
}

.user-form-grid input,
.user-form-grid select {
  min-height: 30px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
}

.user-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.user-form-actions button {
  min-height: 30px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 12px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.user-form-actions button:hover {
  background: var(--accent-bright);
}

.reporting-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.reporting-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(260px, 1.4fr) minmax(180px, 0.9fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: end;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfc;
}

.reporting-filters label {
  display: grid;
  gap: 5px;
  color: #5d6570;
  font-size: 11px;
  font-weight: 700;
}

.reporting-filters input,
.reporting-filters select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
  color: #26333f;
  font-size: 12px;
}

.reporting-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

.reporting-actions button {
  min-height: 34px;
  border: 1px solid #9ca6b0;
  border-radius: 6px;
  padding: 6px 12px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-weight: 700;
}

.reporting-actions button:first-child,
.reporting-actions button:last-child {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.reporting-actions button:hover {
  border-color: var(--accent-bright);
  background: #fff2f6;
  color: var(--accent-bright);
}

.reporting-actions button:first-child:hover,
.reporting-actions button:last-child:hover {
  color: #fff;
  background: var(--accent-bright);
}

.reporting-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reporting-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.reporting-table th,
.reporting-table td {
  border-bottom: 1px solid #e6ebf0;
  padding: 10px 12px;
  background: #fff;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.reporting-table th {
  color: #5d6570;
  font-weight: 700;
  background: #f3f5f7;
  position: sticky;
  top: 0;
  z-index: 1;
}

.reporting-table tbody tr:nth-child(even) td {
  background: #f9fbfc;
}

.reporting-table tbody tr:hover td {
  background: #fff7fa;
}

.reporting-panel h3 {
  margin: 0 0 4px;
  color: var(--accent-bright);
  font-size: 15px;
}

.reporting-panel p {
  margin: 0;
  color: #5d6570;
  font-size: 12px;
}

.reporting-panel button {
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 14px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.reporting-panel button:hover {
  background: var(--accent-bright);
}

.master-data-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.master-data-group {
  border: 1px solid #d8dde4;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.master-data-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.master-data-group-head h3 {
  margin: 0;
  font-size: 15px;
}

.master-data-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.master-data-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.master-data-form input,
.master-data-edit-input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.master-data-form button,
.master-data-edit-button,
.master-data-save-button,
.master-data-cancel-button,
.master-data-delete-button {
  min-height: 32px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.master-data-delete-button,
.master-data-cancel-button {
  border-color: #6b7280;
  background: #6b7280;
}

.master-data-action-buttons {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.master-data-table {
  width: 100%;
  margin-top: 12px;
  border-collapse: collapse;
  font-size: 12px;
}

.master-data-table th,
.master-data-table td {
  padding: 8px 0;
  border-bottom: 1px solid #eef1f4;
  text-align: left;
  vertical-align: middle;
}

.master-data-table th:last-child,
.master-data-table td:last-child {
  text-align: right;
}

.user-management-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 12px;
}

.user-management-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.user-management-table th:nth-child(1),
.user-management-table th:nth-child(2) { width: 11%; }
.user-management-table th:nth-child(3) { width: 18%; }
.user-management-table th:nth-child(4) { width: 13%; }
.user-management-table th:nth-child(5),
.user-management-table th:nth-child(6),
.user-management-table th:nth-child(7) { width: 9%; }
.user-management-table th:nth-child(8) { width: 20%; }

.history-table {
  min-width: 1120px;
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 11px;
}

.history-table th,
.history-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #fff;
  background: #f3f5f7;
  text-align: left;
  vertical-align: top;
}

.history-table th {
  color: #5d6570;
  background: #e9edf2;
  font-weight: 700;
}

.user-management-table th,
.user-management-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #fff;
  background: #f3f5f7;
  text-align: left;
  overflow-wrap: anywhere;
}

.user-table-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 28px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 5px 7px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
}

.user-table-actions {
  white-space: normal;
}

.user-table-actions small { display: block; margin-top: 5px; }

.user-table-actions button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  margin: 2px 4px 2px 0;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  color: #394553;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.user-table-actions button:hover {
  border-color: rgba(176, 18, 77, 0.28);
  color: var(--accent);
}

.user-management-table th {
  color: #5d6570;
  background: #e9edf2;
  font-weight: 700;
}

.user-status {
  display: inline-block;
  min-width: 54px;
  padding: 3px 8px;
  color: #375000;
  background: #eef7dc;
  border: 1px solid #cfe2a5;
  border-radius: 999px;
  text-align: center;
  font-weight: 700;
}

.ticket-toolbar,
.ticket-list-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 18px;
  color: #4c5560;
  font-size: 11px;
}

.ticket-toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
}

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

.ticket-id-search {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: auto;
}

.ticket-id-search input {
  width: 100px;
  min-height: 26px;
  border: 1px solid #aeb4ba;
  border-radius: 4px;
  padding: 3px 5px;
  font-size: 12px;
}

.ticket-id-search button {
  min-height: 26px;
  border: 1px solid #9ca6b0;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.ticket-status-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -6px 0 14px;
  color: #4c5560;
  font-size: 11px;
  line-height: 1.4;
}

.ticket-status-info-label {
  font-weight: 700;
}

.ticket-status-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ticket-status-filter {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  background: #fff;
  color: #4c5560;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
}

.ticket-status-filter strong {
  color: var(--accent);
}

.ticket-status-filter:hover,
.ticket-status-filter.is-active {
  border-color: rgba(176, 18, 77, 0.35);
  background: rgba(176, 18, 77, 0.08);
  color: var(--accent);
}

.ticket-list-head {
  justify-content: space-between;
  margin-top: 36px;
}

.ticket-list-head h2 {
  margin: 0 0 4px;
  color: #4c5560;
  font-size: 13px;
  font-weight: 700;
}

.ticket-toolbar select {
  min-height: 28px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.export-button,
.new-ticket-button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.export-button:hover,
.new-ticket-button:hover {
  border-color: rgba(176, 18, 77, 0.28);
  color: var(--accent);
}

.ticket-table {
  min-width: 1200px;
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11px;
}

.handypool-table {
  min-width: 900px;
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.ticket-create-form {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcfd;
}

.ticket-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px;
  max-width: 860px;
  margin-inline: auto;
}

.ticket-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #5d6570;
  font-size: 11px;
  font-weight: 700;
}

.ticket-form-grid input,
.ticket-form-grid select,
.ticket-form-grid textarea {
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  background: #fff;
  font-size: 12px;
}

.ticket-form-grid textarea {
  resize: vertical;
}

.ticket-form-grid .wide-field {
  grid-column: 1 / -1;
}

.ticket-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  max-width: 860px;
  margin-inline: auto;
}

.ticket-form-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.ticket-form-actions button:hover {
  border-color: rgba(176, 18, 77, 0.28);
  color: var(--accent);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: 24px;
  overflow: auto;
  background: rgba(31, 41, 51, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.quick-ticket-card {
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(31, 41, 51, 0.24);
}

.modal-close {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.ticket-table th,
.ticket-table td,
.handypool-table th,
.handypool-table td {
  border-bottom: 1px solid #fff;
  padding: 7px 8px;
  background: #f3f5f7;
  text-align: left;
  vertical-align: top;
}

.ticket-table th,
.handypool-table th {
  color: #5d6570;
  font-weight: 700;
  background: #e9edf2;
  position: sticky;
  top: 0;
}

.ticket-table tr.ticket-row-highlight td {
  background: #fff2f6;
  box-shadow: inset 0 1px 0 rgba(176, 18, 77, 0.24), inset 0 -1px 0 rgba(176, 18, 77, 0.24);
}

.ticket-table tr.ticket-row-expanded td {
  background: #e7eef3;
}

.ticket-table-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-table th,
.ticket-table td {
  padding: 7px 5px;
  overflow-wrap: anywhere;
}

.handypool-note {
  min-width: 160px;
  max-width: 280px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-device-returns {
  display: grid;
  gap: 8px;
}

.ticket-device-return-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-table th:first-child,
.ticket-table td:first-child:not([colspan]) {
  padding-left: 4px;
  padding-right: 4px;
}

.ticket-row-toggle {
  position: relative;
  width: 22px;
  height: 22px;
  border: 1px solid #c9d0d8;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(31, 41, 51, 0.08);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.ticket-row-toggle[aria-expanded="true"] {
  border-color: rgba(176, 18, 77, 0.42);
  background: #fff2f6;
}

.ticket-row-toggle::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg);
  transition:
    border-color 0.16s ease,
    transform 0.16s ease;
}

.ticket-row-toggle[aria-expanded="true"]::before {
  top: 8px;
  border-color: var(--accent);
  transform: rotate(225deg);
}

.ticket-row-toggle:hover,
.ticket-row-toggle:focus {
  outline: none;
  border-color: rgba(176, 18, 77, 0.42);
  transform: translateY(-1px);
}

.ticket-phone-link {
  border: 0;
  padding: 0;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.ticket-phone-link:hover,
.ticket-phone-link:focus {
  outline: none;
  text-decoration: underline;
}

.pool-badge {
  display: inline-block;
  min-width: 28px;
  border-radius: 4px;
  padding: 2px 5px;
  background: #dfe7f0;
  font-weight: 700;
}

.pool-badge:has(+ *) {
  display: inline-block;
}

.ticket-status-done {
  display: inline-block;
  min-width: 16px;
  border-radius: 4px;
  padding: 2px 5px;
  background: #dff1bd;
  color: #375000;
  font-weight: 700;
}

.ticket-status-open {
  color: #005ca8;
  font-weight: 700;
}

.ticket-status-cancelled {
  color: #7a3647;
  font-weight: 700;
}

.ticket-status-select {
  width: 190px;
  max-width: 100%;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 700;
}

.ticket-status-select:focus {
  outline: 2px solid rgba(176, 18, 77, 0.22);
  border-color: var(--accent);
}

.ticket-detail-row td {
  background: #f9fbfc;
  border-bottom: 1px solid #b9c5ce;
}

.ticket-detail-panel {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(260px, 1fr) auto minmax(260px, 1.2fr);
  gap: 16px;
  align-items: start;
  max-width: 1180px;
  margin-inline: auto;
  padding: 8px 0 10px;
}

.ticket-detail-panel label,
.ticket-detail-panel div {
  display: grid;
  gap: 5px;
}

.ticket-detail-panel span {
  color: #5d6570;
  font-weight: 700;
}

.ticket-detail-panel strong {
  font-weight: 500;
}

.ticket-detail-controls {
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: end;
}

.ticket-detail-controls input {
  width: 100%;
  min-height: 30px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 5px 7px;
  background: #fff;
  font-size: 12px;
}

.ticket-detail-note {
  grid-column: 1 / -1;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: start;
}

.ticket-note-input {
  min-height: 52px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  resize: vertical;
  font-size: 12px;
}

.ticket-autosave-status {
  align-self: end;
  min-width: 92px;
  min-height: 28px;
  padding: 6px 0;
  color: #52606d;
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.ticket-autosave-status[data-state="saved"] {
  color: #246b45;
}

.ticket-autosave-status[data-state="error"] {
  color: #a61b2b;
}

.replacement-device-card {
  max-width: 780px;
}

.replacement-device-card .ticket-form-actions {
  position: sticky;
  bottom: -18px;
  margin: 12px -18px -18px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.replacement-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f3f5f7;
}

.replacement-summary p {
  margin: 0;
}

.replacement-fieldset {
  display: grid;
  gap: 8px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  padding: 10px 12px;
}

.replacement-fieldset legend {
  padding: 0 4px;
  color: #5d6570;
  font-weight: 700;
}

.inline-choice,
.device-choice {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.device-choice small {
  display: block;
  color: #5d6570;
  font-size: 11px;
}

.ticket-history-field {
  grid-column: 1 / -1;
  padding-top: 4px;
}

.ticket-message-field {
  grid-column: 1 / -1;
}

.ticket-message-text {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #d8dde4;
  border-radius: 8px;
  background: #fff;
  color: #26333f;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ticket-upload-panel {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding-top: 4px;
}

.ticket-document-upload-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ticket-document-upload-form input[type="file"] {
  min-width: 240px;
}

.ticket-document-upload-form button,
.ticket-document-delete {
  min-height: 28px;
  border: 1px solid #9ca6b0;
  border-radius: 6px;
  background: #fff;
  color: #394553;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.ticket-document-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-document-list li {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2f5;
}

.ticket-document-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ticket-document-list a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.ticket-document-delete {
  min-height: 24px;
  border-color: #c9d0d8;
  color: #7a3647;
  font-size: 10px;
}

.ticket-document-delete:hover {
  border-color: rgba(176, 18, 77, 0.42);
  color: var(--accent);
}

.ticket-document-list span,
.ticket-document-empty {
  color: #5d6570;
  font-size: 11px;
}

.ticket-history-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-history-list li {
  display: grid;
  grid-template-columns: 145px 160px minmax(260px, 1fr) 150px;
  gap: 10px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef2f5;
}

.ticket-history-list time {
  color: #5d6570;
}

.ticket-history-list strong {
  color: #394553;
  font-weight: 700;
}

.ticket-history-list span,
.ticket-history-list small,
.ticket-history-empty {
  color: #5d6570;
}

.action-group {
  margin-bottom: 18px;
}

.action-group button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 4px 6px;
  color: #000;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
}

.action-group button:hover,
.main-nav a:hover,
.service-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.shop-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shop-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 14px;
  align-items: start;
}

.shop-order-form {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.shop-order-form label,
.shop-product-actions label {
  display: grid;
  gap: 5px;
  color: #5d6570;
  font-size: 12px;
  font-weight: 700;
}

.shop-recipient-choice {
  display: grid;
  gap: 8px;
}

.shop-recipient-choice label {
  display: flex;
  align-items: center;
}

.shop-recipient-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.shop-delivery-fields {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shop-delivery-fields h3 {
  margin: 0;
  font-size: 15px;
}

.shop-order-form input,
.shop-quantity-input {
  min-height: 34px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 6px 8px;
  background: #fff;
}

.shop-products {
  display: grid;
  gap: 10px;
}

.shop-category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.shop-category-nav a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.shop-category-nav a:hover,
.shop-category-nav a:focus-visible {
  background: #edf3fa;
  text-decoration: underline;
}

.shop-category {
  scroll-margin-top: 20px;
  display: grid;
  gap: 10px;
}

.shop-category + .shop-category {
  margin-top: 8px;
}

.shop-category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 2px;
  border-bottom: 1px solid var(--line);
}

.shop-category-head h3 {
  margin: 0;
  font-size: 15px;
}

.shop-category-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.shop-cart,
.shop-order-summary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shop-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.shop-cart h3,
.shop-order-summary h3 {
  margin: 0;
  font-size: 15px;
}

.shop-cart-items {
  display: grid;
  gap: 8px;
}

.shop-cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.shop-cart-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.shop-cart-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shop-cart-quantity {
  width: 70px;
  min-height: 32px;
  border: 1px solid #c9d0d8;
  border-radius: 6px;
  padding: 5px 7px;
}

.shop-order-summary p,
.shop-order-summary ul {
  margin: 0;
}

.shop-order-summary ul {
  padding-left: 18px;
}

.shop-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.shop-product.has-image {
  grid-template-columns: 88px minmax(0, 1fr) auto;
}

.shop-product-image {
  display: grid;
  place-items: center;
  width: 88px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.shop-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.shop-product.is-inactive {
  opacity: 0.64;
}

.shop-product-main {
  display: grid;
  gap: 8px;
}

.shop-product h3,
.shop-product p {
  margin: 0;
}

.shop-product h3 {
  font-size: 16px;
}

.shop-product p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.shop-product-meta,
.shop-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.shop-product-meta span,
.shop-product-meta strong {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface);
  color: #505761;
  font-size: 12px;
}

.shop-product-actions {
  justify-content: flex-end;
}

.shop-product-actions button,
#clearShopCart,
#confirmShopOrder,
#showShopProductCreate {
  min-height: 34px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 6px 10px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

.shop-product-actions button:hover,
#clearShopCart:hover,
#confirmShopOrder:hover,
#showShopProductCreate:hover {
  background: var(--accent-bright);
}

.shop-product-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.shop-edit-button,
.shop-cart-remove,
#clearShopCart,
.shop-delete-button {
  color: var(--accent) !important;
  background: #fff !important;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed #c9d0d8;
  border-radius: 8px;
  background: var(--surface);
}

@media (max-width: 880px) {
  .top-banner {
    grid-template-columns: 1fr;
    padding-top: 12px;
  }

  .brand-panel {
    align-self: auto;
    width: 188px;
    margin: 0 12px 12px;
  }

  .main-nav,
  .service-links,
  .hero-strip {
    min-height: auto;
    margin: 0 12px 8px;
  }

  .hero-strip {
    min-height: 130px;
  }

  .user-bar {
    padding-left: 12px;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .master-data-groups {
    grid-template-columns: 1fr;
  }

  .leasing-history-layout,
  .leasing-overview-filters,
  .leasing-overview-layout,
  .reporting-filters {
    grid-template-columns: 1fr;
  }

  .leasing-overview-actions {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }

  .leasing-overview-actions button {
    flex: 1 1 140px;
  }

  .leasing-device-detail {
    position: static;
  }

  .leasing-device-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .leasing-device-meta,
  .leasing-device-rate,
  .leasing-row-status {
    grid-column: 2;
  }

  .leasing-action-grid,
  .leasing-detail-list {
    grid-template-columns: 1fr;
  }

  .leasing-history-block li {
    grid-template-columns: 1fr;
  }

  .ticket-column,
  .action-column {
    border: 0;
    border-top: 1px solid var(--accent);
  }

  .contract-panel {
    padding: 18px 12px;
  }
}

@media (max-width: 560px) {
  .user-bar,
  .section-heading,
  .bar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .user-bar {
    gap: 8px;
    padding: 8px 12px;
  }

  .tabs {
    overflow-x: auto;
  }

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

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

  .shop-layout,
  .shop-order-form,
  .shop-product {
    grid-template-columns: 1fr;
  }

  .shop-order-form {
    position: static;
    max-height: none;
    overflow-y: visible;
  }

  .shop-product.has-image {
    grid-template-columns: 1fr;
  }

  .shop-cart-item {
    grid-template-columns: 1fr;
  }

  .shop-product-actions {
    justify-content: flex-start;
  }
}
:root { --import-border: #d8dce2; }
.data-import-card { width: 100%; margin-inline: auto; padding: 24px; box-sizing: border-box; }
.data-import-card > p, .data-import-card .section-heading { text-align: center; }
.data-import-card .section-heading { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.data-import-card .section-heading h1 { font-size: 24px; color: var(--accent); font-weight: 700; }
.data-import-card .section-heading p { color: var(--muted); font-size: 13px; }
.data-import-card h2 { text-align: center; color: var(--accent); }
.data-import-card button { border: 1px solid var(--accent); background: var(--accent); color: white; padding: 10px 16px; border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.data-import-card button:hover:not(:disabled) { background: var(--accent-bright); }
.data-import-card button:disabled { opacity: .5; cursor: default; }
.data-import-card button:focus-visible, .data-import-card a:focus-visible, .data-import-card input:focus-visible, .data-import-card select:focus-visible { outline: 3px solid #456db4; outline-offset: 3px; }
.data-import-card select { font: inherit; background: white; border: 1px solid var(--line); border-radius: 6px; }
.import-controls { max-width: 850px; margin: 24px auto; padding: 24px; border: 1px solid var(--import-border); border-radius: 12px; background: #fff; }
.import-template-link { display: inline-block; margin-bottom: 20px; font-weight: 700; color: var(--accent); }
#dataImportForm { display: grid; gap: 16px; }
#dataImportForm label { display: grid; gap: 6px; font-weight: 600; }
#dataImportForm select, #dataImportForm input { width: 100%; padding: 10px; box-sizing: border-box; }
#dataImportForm p { margin: 0; line-height: 1.6; }
.import-local-note { color: #555; }
.import-table-wrap { overflow-x: auto; max-height: 500px; border: 1px solid var(--import-border); }
.import-table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 780px; }
.import-table th, .import-table td { padding: 10px; border-bottom: 1px solid var(--import-border); text-align: left; overflow-wrap: anywhere; vertical-align: top; }
.import-table th { position: sticky; top: 0; background: #f4f5f7; }
.import-pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 16px; }
.import-confirm { display: flex; align-items: center; gap: 10px; margin-block: 16px; }
.import-confirm input { width: auto; }
#dataImportConfirmPanel { max-width: 850px; margin: 24px auto; }
#dataImportErrors { max-height: 200px; overflow: auto; }
#dataImportMessage { font-weight: 600; line-height: 1.6; }

#deleteContractButton { background: #fff; color: #a31919; border: 1px solid #a31919; }
#deleteContractButton:hover { background: #fff0f0; }
.customer-access-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.customer-access-list { max-height: 40vh; overflow-y: auto; display: grid; gap: 8px; }
.customer-access-list label { display: flex; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.customer-access-list input { width: auto; }
@media (max-width: 600px) { .customer-access-columns { grid-template-columns: 1fr; } }
#customerAccessForm { max-height: 90vh; overflow-y: auto; }
#addFromPoolSelect { display: block; width: 100%; max-width: 100%; min-width: 0; margin-top: 8px; }

/* Keep the return checkbox next to its IMEI despite generic ticket grid rules. */
.ticket-detail-panel .ticket-device-return-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.ticket-device-return-label input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 2px 0 0;
}
.ticket-device-return-label span { min-width: 0; overflow-wrap: anywhere; }

.shop-order-phone { display: grid; gap: 6px; margin-block: 12px; }
.shop-order-phone input { width: 100%; min-width: 0; }

.central-customer-address { max-width: 760px; margin: 16px auto; padding: 16px; background: #f3f5f7; border-radius: 8px; }

/* Cancellation dates in contract and overview, relative to the Berlin calendar day. */
.detail-grid dd.cancellation-past,
.detail-grid dd.cancellation-past .detail-input {
  background-color: #fee2e2;
  color: #991b1b;
}
.detail-grid dd.cancellation-upcoming,
.detail-grid dd.cancellation-upcoming .detail-input {
  background-color: #ffedd5;
  color: #9a3412;
}

.customer-address-trigger {
  position: relative;
  display: inline-block;
  cursor: default;
  text-decoration: none;
}
.customer-address-tooltip {
  display: none;
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  width: max-content;
  max-width: min(320px, 65vw);
  padding: 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #172033;
  box-shadow: 0 4px 16px #0002;
  white-space: pre-line;
  overflow-wrap: anywhere;
  font-weight: normal;
  text-align: left;
  text-decoration: none;
}
.customer-address-trigger:hover .customer-address-tooltip,
.customer-address-trigger:focus .customer-address-tooltip {
  display: block;
}

/* Login branding and public legal texts. */
.login-logo-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; }
.login-ata-logo-frame { display: block; flex: 0 0 112px; width: 112px; height: 56px; overflow: hidden; }
.login-ata-logo { display: block; width: 168px; max-width: none; height: auto; transform: translate(-28px, -57px); }
.login-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-top: 16px; font-size: 11px; }
.login-legal a { color: var(--muted); text-decoration: none; }
.legal-dialog a { color: var(--accent); text-underline-offset: 3px; }
.legal-dialog { width: min(800px, calc(100% - 32px)); max-height: 85vh; padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--text); box-shadow: var(--shadow); }
.legal-dialog::backdrop { background: rgb(20 30 40 / 50%); }
.legal-header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; background: white; border-bottom: 1px solid var(--line); }
.legal-header h1 { margin: 0; font-size: 22px; color: var(--accent); }
.legal-content { padding: 8px 24px 24px; line-height: 1.6; overflow-wrap: anywhere; }
.legal-content h2 { font-size: 18px; }

.detail-readonly { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: #f2f4f7; color: #59616c; }

.shop-order-note textarea { width: 100%; min-height: 80px; resize: vertical; padding: 8px; font: inherit; border: 1px solid #c9d0d8; border-radius: 6px; }
.shop-note-preview { white-space: pre-wrap; overflow-wrap: anywhere; }


/* BLB mobile/tablet: desktop layout above these breakpoints stays unchanged. */
.mobile-menu-toggle { display: none; }
@media (max-width: 1024px), (max-width: 1366px) and (pointer: coarse) {
  .login-screen { min-height: 100svh; padding: 16px; }
  .top-banner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; min-height: 0; padding: 12px 16px; gap: 12px; }
  .brand-panel { width: auto; min-height: 0; margin: 0; padding: 4px 8px; justify-self: start; }
  .top-banner .is-blb-logo { min-width: 100px; min-height: 0; }
  .top-banner .is-blb-logo img { width: 100px; max-height: 54px; }
  .hero-strip { display: none; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 8px; background: white; color: var(--accent); font: inherit; font-weight: 700; }
  .top-banner .main-nav, .top-banner .service-links { display: none; grid-column: 1 / -1; margin: 0; min-height: 0; }
  .top-banner.mobile-menu-open .main-nav, .top-banner.mobile-menu-open .service-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .main-nav a, .service-links a { display: flex; align-items: center; min-height: 44px; padding: 10px; font-size: 14px; }
  .user-bar { padding: 10px 16px; gap: 12px; flex-wrap: wrap; }
  .bar-actions { gap: 8px; }
  .search input { width: min(320px, 100%); height: 44px; }
  .search-results { top: 100%; right: 12px; width: min(420px, calc(100% - 24px)); }
  .search-result { min-height: 48px; padding: 12px; }
  .search-result strong, .search-result span { font-size: 14px; }
  .workspace { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 16px; }
  .workspace > * { min-width: 0; }
  .contract-panel { grid-row: 1; padding: 0; min-width: 0; }
  .ticket-column, .action-column { border: 1px solid var(--line); }
  .tabs { justify-content: flex-start; overflow-x: auto; padding-bottom: 6px; }
  .tabs button { flex: 0 0 auto; }
  .detail-grid { max-width: 760px; font-size: 14px; }
  .detail-grid dt, .detail-grid dd { padding: 10px; min-width: 0; overflow-wrap: anywhere; }
  .detail-actions { max-width: 760px; flex-wrap: wrap; font-size: 14px; }
  .detail-head { flex-wrap: wrap; gap: 10px; }
  .detail-head h2, #contractTitle { overflow-wrap: anywhere; }
  .list-card { margin-top: 0; }
  .app-shell button, .login-card button, .app-shell input:not([type="checkbox"]):not([type="radio"]), .login-card input, .app-shell select { min-height: 44px; }
  .tabs button, .detail-actions button, .record-table { font-size: 14px; }
  input, select, textarea, .detail-input { font-size: 16px; max-width: 100%; }
  .detail-input { height: 44px; }
  button, a, input, select, textarea { touch-action: manipulation; }
  :is(button, a, input, select, textarea):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
  .modal-backdrop { padding: 12px; }
  .quick-ticket-card { max-height: calc(100dvh - 24px); }
  .form-grid, .ticket-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-panel { max-width: 760px; }
}
@media (max-width: 600px) {
  .top-banner.mobile-menu-open .main-nav, .top-banner.mobile-menu-open .service-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-bar { align-items: stretch; flex-direction: column; }
  .bar-actions { flex-direction: row; width: 100%; align-items: center; }
  .search { flex: 1; min-width: 0; }
  .search input { width: 100%; min-width: 0; }
  .workspace, .workspace.list-mode { padding: 12px; }
  .detail-card, .list-card, .create-card { padding: 14px 10px; min-height: 0; }
  .detail-card .detail-head { display: flex; }
  .detail-card .detail-head::before { display: none; }
  .detail-grid, .form-grid, .ticket-form-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-grid dt { padding-bottom: 4px; }
  .detail-grid dd { padding-top: 4px; margin-bottom: 6px; }
  .record-table { display: block; min-width: 0; font-size: 14px; }
  .record-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .record-table tbody { display: grid; gap: 12px; }
  .record-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
  .record-table td { min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; }
  .record-table td:first-child, .record-table td[colspan] { grid-column: 1 / -1; }
  .record-table td:empty { display: none; }
  .record-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
  .record-table .record-link { font-size: 16px; text-align: left; }
  .detail-actions button { flex: 1 1 auto; border: 1px solid var(--line); }
  .save-feedback { flex-basis: 100%; }
}
