:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --border: rgba(213, 199, 173, 0.42);
  --shadow: 0 18px 44px rgba(114, 128, 118, 0.08);
  --sidebar-bg: linear-gradient(180deg, #edf6ee, #e5f0e7);
  --content-bg: #ffffff;
  --text-main: #243640;
  --text-soft: #607266;
  --menu-bg: rgba(255, 255, 255, 0.84);
  --menu-hover: rgba(183, 208, 188, 0.22);
  --menu-active: rgba(176, 203, 181, 0.42);
  --card-bg: #ffffff;
  --card-border: rgba(213, 199, 173, 0.6);
  --button-bg: #0f5870;
  --button-hover: #0c4c61;
  --form-bg: #ffffff;
  --secondary-bg: #f5f5f2;
  --secondary-hover: #ecebe6;
  --danger-bg: #b34747;
  --danger-hover: #9d3b3b;
  --accent-shell: linear-gradient(180deg, #edf6ee, #e5f0e7);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg);
  color: var(--text-main);
}

body {
  min-height: 100vh;
  padding: 18px;
  overflow: hidden;
}

.login-body {
  padding: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(206, 230, 211, 0.75), transparent 28%),
    linear-gradient(180deg, #f5faf5, #e9f2eb);
}

.login-shell {
  width: min(92vw, 460px);
}

.login-card {
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(92, 122, 98, 0.12);
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-logo {
  width: min(100%, 240px);
  height: auto;
}

.login-title {
  margin: 0 0 10px;
  font-size: 1.45rem;
  color: #1e3340;
}

.login-copy {
  margin: 0 0 18px;
  color: #597067;
  line-height: 1.5;
}

.login-button {
  width: 100%;
  margin-top: 18px;
}

.shell {
  display: grid;
  grid-template-columns: 310px 1fr;
  height: calc(100vh - 36px);
  min-height: 0;
  border: 1px solid rgba(223, 232, 224, 0.95);
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.sidebar {
  position: relative;
  background: var(--sidebar-bg);
  border-right: 1px solid rgba(122, 156, 129, 0.18);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 210px 22px auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 156, 130, 0.45), transparent);
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  min-height: 0;
  padding: 28px 22px 24px;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(147, 176, 152, 0.22);
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-group {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 0 4px;
}

.project-select {
  width: 100%;
  appearance: none;
  border: 1px solid rgba(133, 163, 138, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-main);
  padding: 12px 14px;
  font-size: 0.98rem;
  outline: none;
}

.menu-link,
.menu-link-static,
.submenu-link {
  display: block;
  text-decoration: none;
  color: var(--text-main);
  border-radius: 14px;
  transition: background-color 140ms ease, transform 140ms ease;
}

.menu-link,
.menu-link-static {
  padding: 13px 14px;
  background: var(--menu-bg);
  border: 1px solid rgba(150, 177, 155, 0.16);
  font-size: 1rem;
  font-weight: 600;
}

.menu-link:hover,
.submenu-link:hover {
  background: var(--menu-hover);
  transform: translateX(2px);
}

.menu-link-active,
.submenu-link-active {
  background: var(--menu-active);
  font-weight: 700;
}

.menu-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.submenu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
}

.submenu-link {
  padding: 10px 12px;
  font-size: 0.96rem;
  color: #3d5243;
}

.test-nav-button {
  width: 100%;
  min-height: 38px;
  margin-top: auto;
  border: 1px dashed rgba(15, 88, 112, 0.36);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #0f5870;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.test-nav-button:hover {
  background: rgba(237, 246, 238, 0.95);
}

.current-user-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(147, 176, 152, 0.22);
}

.current-user-label,
.current-user-role,
.current-user-login {
  margin: 0;
  color: #5a6f63;
}

.current-user-label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.monteur-body {
  min-height: 100vh;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at top left, rgba(206, 230, 211, 0.58), transparent 24%),
    linear-gradient(180deg, #f6fbf7, #e7f2e9);
}

.monteur-shell {
  width: min(100%, 1460px);
  margin: 0 auto;
}

.monteur-page-shell {
  overflow: auto;
}

.monteur-page-shell .monteur-shell {
  min-height: auto;
}

.monteur-card {
  border: 1px solid rgba(223, 232, 224, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 28px;
}

.monteur-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 14px;
}

.monteur-header-copy {
  display: flex;
  align-items: center;
  gap: 14px;
}

.monteur-logo {
  width: 96px;
  max-width: 100%;
  height: auto;
}

.monteur-subpage-header {
  align-items: flex-start;
  margin-bottom: 14px;
}

.monteur-subpage-header .monteur-header-copy {
  gap: 14px;
}

.monteur-subpage-header .monteur-logo {
  width: 98px;
}

.monteur-subpage-header .workspace-title {
  font-size: 0.98rem;
  margin-top: 2px;
}

.monteur-subpage-header .eyebrow {
  margin-bottom: 4px;
}

.monteur-copy {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--text-soft);
  line-height: 1.5;
}

.monteur-version-stack {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.monteur-version-line {
  margin: 0;
  color: #5f7068;
  font-size: 0.78rem;
  font-weight: 650;
}

.monteur-header-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.monteur-header-actions-compact {
  align-items: flex-end;
  gap: 10px;
}

.monteur-header-user {
  width: 100%;
  margin: 2px 0 0;
  text-align: right;
  color: #5a6f63;
  font-size: 0.8rem;
  font-weight: 650;
}

.monteur-header-user-meta {
  display: none;
}

.monteur-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.monteur-sync-workspace[hidden] {
  display: none !important;
}

#monteur-home-view[hidden] {
  display: none !important;
}

.monteur-grid-bottom {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
}

.monteur-panel {
  border-radius: 18px;
  border: 1px solid rgba(213, 199, 173, 0.42);
  background: linear-gradient(180deg, #edf6ee, #e8f2ea);
  padding: 14px;
}

.monteur-user-panel {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.monteur-time {
  margin: 10px 0 0;
  color: #476055;
  font-size: 1.18rem;
  font-weight: 700;
}

.monteur-section-label {
  margin: 0 0 4px;
  color: #5d7368;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.monteur-section-title {
  margin: 0;
  color: #17303a;
  font-size: 1.15rem;
}

.monteur-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.monteur-section-head-split {
  align-items: flex-start;
}

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

.monteur-connection-stack {
  display: grid;
  gap: 12px;
}

.monteur-inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.monteur-connection-status-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(213, 199, 173, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.monteur-connection-status {
  margin: 0;
  color: #8a3f3f;
  font-size: 0.98rem;
  font-weight: 800;
}

.monteur-connection-status.is-active {
  color: #1f7d45;
}

.monteur-connection-url {
  margin: 0;
  color: #51665d;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.monteur-release-box {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(213, 199, 173, 0.55);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.monteur-release-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.monteur-release-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #17303a;
  font-size: 0.9rem;
  font-weight: 700;
}

.monteur-release-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #0f5b72;
}

.monteur-release-version {
  color: #17303a;
  font-size: 0.9rem;
  font-weight: 700;
}

.monteur-version-dialog-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  margin-bottom: 18px;
}

.monteur-version-dialog-grid strong {
  display: block;
  margin-bottom: 4px;
  color: #1e3340;
  font-size: 0.92rem;
}

.monteur-version-dialog-grid p {
  margin: 0;
  color: #5f7068;
  font-size: 0.92rem;
}

.monteur-action-button {
  min-height: 66px;
  border: 1px solid rgba(12, 88, 112, 0.12);
  border-radius: 14px;
  background: linear-gradient(180deg, #0f5b72, #0d4e61);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  box-shadow: 0 12px 26px rgba(15, 88, 112, 0.12);
}

.monteur-action-button:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #10657e, #0d5368);
}

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

.monteur-stage-card {
  min-height: 140px;
  border-radius: 14px;
  border: 1px dashed rgba(15, 88, 112, 0.28);
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.monteur-stage-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: #16303b;
}

.monteur-aks-page .workspace-header {
  align-items: center;
}

.monteur-aks-page .workspace-title-large {
  font-size: 0.98rem;
}

.monteur-aks-page .aks-header-button {
  min-width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.monteur-aks-page .aks-workspace {
  gap: 10px;
}

.monteur-aks-page .aks-project-card,
.monteur-aks-page .aks-head-card,
.monteur-aks-page .aks-filter-card,
.monteur-aks-page .aks-table-card {
  border-radius: 14px;
}

.monteur-aks-page .aks-project-card,
.monteur-aks-page .aks-head-card,
.monteur-aks-page .aks-filter-card,
.monteur-aks-page .aks-table-card {
  padding: 8px;
}

.monteur-aks-page .aks-summary-title {
  margin-bottom: 8px;
  font-size: 0.88rem;
}

.monteur-aks-page .aks-stat-frames {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.78fr) minmax(0, 0.96fr) minmax(0, 1fr);
  gap: 6px;
  align-items: stretch;
  overflow: hidden;
}

.monteur-aks-page .aks-stat-frame {
  min-height: 84px;
  min-width: 0;
  border-radius: 10px;
  padding: 5px;
  overflow: hidden;
}

.monteur-aks-page .aks-stat-frame-title {
  margin-bottom: 4px;
  font-size: 0.76rem;
}

.monteur-aks-page .aks-stat-frame-body {
  border-radius: 8px;
  padding: 5px;
}

.monteur-aks-page .aks-stat-card {
  min-height: 28px;
  padding: 4px 5px;
  border-radius: 8px;
}

.monteur-aks-page .aks-stat-card span {
  font-size: 0.62rem;
}

.monteur-aks-page .aks-stat-card strong {
  font-size: 0.66rem;
}

.monteur-aks-page .aks-stat-damper-layout {
  grid-template-columns: 1fr;
  gap: 8px;
}

.monteur-aks-page .aks-stat-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.monteur-aks-page .aks-stat-coupler-layout,
.monteur-aks-page .aks-stat-module-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.monteur-aks-page .aks-stat-frame-ringbus {
  min-width: 0;
}

.monteur-aks-page .aks-ringbus-list {
  max-height: 142px;
  padding: 6px;
}

.monteur-aks-page .ringbus-summary-header,
.monteur-aks-page .ringbus-summary-row {
  grid-template-columns: minmax(0, 1fr) 24px repeat(3, 44px);
  gap: 3px;
}

.monteur-aks-page .ringbus-summary-name,
.monteur-aks-page .ringbus-summary-header span,
.monteur-aks-page .ringbus-summary-row strong,
.monteur-aks-page .ringbus-summary-status {
  font-size: 0.68rem;
}

.monteur-aks-page .ringbus-summary-name {
  font-size: 0.78rem;
}

.monteur-aks-page .aks-filter-grid {
  gap: 8px;
}

.monteur-aks-page .field-label {
  font-size: 0.76rem;
}

.monteur-aks-page .field-input,
.monteur-aks-page .readonly-value {
  height: 30px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 0.8rem;
}

.monteur-aks-page .filter-clear-wrap .field-input {
  padding-right: 28px;
}

.monteur-aks-page .filter-clear-button {
  width: 17px;
  height: 17px;
  font-size: 0.8rem;
}

.monteur-aks-page .aks-table-toolbar {
  min-height: 24px;
  gap: 8px;
}

.monteur-aks-page .inline-hint,
.monteur-aks-page .aks-filter-count {
  font-size: 0.74rem;
}

.monteur-aks-page .history-button {
  width: 24px;
  height: 24px;
  font-size: 0.86rem;
}

.monteur-aks-page .aks-table {
  min-width: 860px;
  font-size: 0.74rem;
}

.monteur-aks-page .aks-table th,
.monteur-aks-page .aks-table td {
  padding: 6px 7px;
}

.monteur-aks-page .aks-table th:first-child,
.monteur-aks-page .aks-table td:first-child {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}

.monteur-aks-page .aks-table-select,
.monteur-aks-page .aks-table-input {
  min-width: 88px;
  height: 28px;
  border-radius: 8px;
  padding: 0 8px;
  font-size: 0.78rem;
}

.monteur-aks-page .aks-table-input {
  min-width: 54px;
}

.monteur-aks-page .aks-table-order-input {
  width: 48px;
  min-width: 48px;
  max-width: 48px;
}

.monteur-aks-page .aks-table-barcode-input {
  width: 90px;
  min-width: 90px;
  max-width: 90px;
}

.monteur-aks-page .aks-table-motor-input,
.monteur-aks-page .aks-table-motor-select {
  width: 64px;
  min-width: 64px;
  max-width: 72px;
}

.monteur-aks-page .aks-status-pill {
  min-height: 20px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

.monteur-aks-page .icon-action {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.78rem;
}

.monteur-stage-copy {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .monteur-grid,
  .monteur-grid-bottom,
  .monteur-actions,
  .monteur-summary {
    grid-template-columns: 1fr;
  }

  .monteur-header,
  .monteur-header-copy {
    flex-direction: column;
  }
}

.current-user-name {
  margin: 8px 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: #233944;
}

.current-user-role,
.current-user-login {
  font-size: 0.88rem;
}

.logout-button {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(180, 71, 71, 0.92);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.logout-button:hover {
  background: #9d3b3b;
}

.content {
  padding: 18px 14px 18px 18px;
  background: var(--content-bg);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  min-height: 0;
}

.workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.workspace-header-compact {
  justify-content: flex-start;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8c7d63;
}

.workspace-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3340;
}

.workspace-title-large {
  font-size: 1.15rem;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--button-bg);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.94rem;
  white-space: nowrap;
}

.primary-action:hover {
  background: var(--button-hover);
}

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

.project-list-card,
.form-shell {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(231, 223, 204, 0.85);
  background: #fcfaf7;
}

.form-shell-accent {
  background: var(--accent-shell);
  border-color: rgba(204, 219, 207, 0.95);
}

.project-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
}

.project-copy {
  min-width: 0;
}

.project-name {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #223744;
}

.project-meta {
  margin: 0;
  min-height: 1.1rem;
  font-size: 0.84rem;
  color: #6f736f;
}

.edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(195, 181, 156, 0.65);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f2430;
  cursor: pointer;
  text-decoration: none;
}

.form-frame {
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 16px;
  background: var(--form-bg);
  overflow: hidden;
}

.inner-frame {
  margin-top: 14px;
}

.form-section-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(236, 229, 214, 0.95);
  font-size: 1rem;
  font-weight: 700;
  color: #243640;
}

.project-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px 12px;
  padding: 16px;
}

.user-form {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.95rem;
  color: #1f3140;
}

.field-input,
.readonly-value {
  height: 38px;
  border: 1px solid rgba(212, 198, 171, 0.92);
  border-radius: 10px;
  background: #ffffff;
  padding: 0 12px;
  font-size: 0.96rem;
  color: #223744;
  outline: none;
  display: flex;
  align-items: center;
}

.file-input {
  padding-top: 8px;
}

.field-select {
  appearance: none;
}

.field-input:focus {
  border-color: rgba(110, 157, 120, 0.9);
  box-shadow: 0 0 0 3px rgba(190, 220, 196, 0.3);
}

.filter-clear-wrap {
  position: relative;
  display: block;
}

.filter-clear-wrap .field-input {
  width: 100%;
  padding-right: 34px;
}

.filter-clear-button {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(151, 180, 157, 0.42);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #607266;
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
}

.filter-clear-button:hover {
  background: rgba(237, 246, 238, 0.96);
  color: #0f5870;
  border-color: rgba(15, 88, 112, 0.38);
}

.form-actions {
  display: flex;
  gap: 12px;
  padding: 16px 4px 0;
}

.action-button {
  min-width: 120px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

a.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.action-button-primary {
  background: var(--button-bg);
  color: #ffffff;
}

.action-button-primary:hover {
  background: var(--button-hover);
}

.action-button-secondary {
  background: var(--secondary-bg);
  color: #243640;
  border: 1px solid rgba(213, 199, 173, 0.75);
}

.action-button-secondary:hover {
  background: var(--secondary-hover);
}

.action-button-compact {
  min-width: 190px;
  width: auto;
  justify-self: start;
  padding: 0 14px;
  font-size: 0.86rem;
}

.action-button-danger {
  background: var(--danger-bg);
  color: #ffffff;
}

.action-button-danger:hover {
  background: var(--danger-hover);
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1000;
  min-width: 220px;
  max-width: min(92vw, 360px);
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(15, 88, 112, 0.94);
  color: #ffffff;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 44px rgba(15, 88, 112, 0.24);
}

.toast[hidden] {
  display: none !important;
}

.process-toast-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(27, 45, 36, 0.22);
  backdrop-filter: blur(2px);
}

.process-toast-overlay[hidden] {
  display: none !important;
}

.process-toast {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  width: min(92vw, 520px);
  padding: 22px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(210, 232, 214, 0.72), transparent 34%),
    #ffffff;
  box-shadow: 0 24px 64px rgba(17, 44, 28, 0.2);
  animation: process-pop 220ms ease-out both;
}

.process-orb {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 6px solid rgba(204, 219, 207, 0.8);
  border-top-color: #0f5870;
  border-right-color: #7bb488;
  box-shadow: inset 0 0 0 8px rgba(237, 246, 238, 0.9);
  animation: process-spin 880ms linear infinite;
}

.process-copy {
  min-width: 0;
}

.process-kicker {
  margin: 0 0 5px;
  color: #8c7d63;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.process-copy h2 {
  margin: 0 0 12px;
  color: #223744;
  font-size: 1.12rem;
}

.process-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(213, 199, 173, 0.32);
}

.process-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f5870, #80b889);
  transition: width 420ms ease;
}

.process-step-list {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.process-step-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  align-items: center;
  min-height: 28px;
  color: #66776f;
  font-size: 0.92rem;
  font-weight: 650;
  opacity: 0.7;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.process-step-marker {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(151, 180, 157, 0.55);
  border-radius: 50%;
  background: #ffffff;
}

.process-step-item.is-active {
  color: #223744;
  opacity: 1;
  transform: translateX(2px);
}

.process-step-item.is-active .process-step-marker {
  border-top-color: #0f5870;
  border-right-color: #7bb488;
  animation: process-spin 680ms linear infinite;
}

.process-step-item.is-done {
  color: #315340;
  opacity: 1;
}

.process-step-item.is-done .process-step-marker {
  display: grid;
  place-items: center;
  border-color: #7bb488;
  background: #dff4e6;
}

.process-step-item.is-done .process-step-marker::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid #1f7d45;
  border-bottom: 2px solid #1f7d45;
  transform: rotate(-45deg) translateY(-1px);
}

@keyframes process-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes process-pop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(26, 42, 34, 0.28);
}

.confirm-overlay[hidden] {
  display: none !important;
}

.confirm-overlay-top {
  z-index: 1300;
}

.confirm-dialog {
  width: min(92vw, 420px);
  padding: 22px;
  border-radius: 18px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(17, 44, 28, 0.16);
}

.confirm-title {
  margin: 0 0 10px;
  font-size: 1.12rem;
  color: #223744;
}

.confirm-message {
  margin: 0;
  color: #4b5d55;
}

.confirm-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.delete-confirm-dialog {
  width: min(92vw, 500px);
}

.delete-confirm-aks {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.86);
  color: #223744;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.aks-add-dialog {
  width: min(92vw, 560px);
}

.aks-add-field {
  margin-top: 16px;
}

.aks-schema-warning {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(176, 117, 45, 0.32);
  border-radius: 12px;
  background: #fff7e8;
  color: #86520b;
  line-height: 1.45;
}

.aks-schema-warning[hidden] {
  display: none !important;
}

.module-description,
.module-live-aks {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
}

.module-description {
  background: rgba(237, 246, 238, 0.9);
  color: #315340;
  font-weight: 700;
}

.module-live-aks {
  border: 1px solid rgba(151, 180, 157, 0.38);
  background: #ffffff;
  color: #243640;
  font-weight: 700;
}

.entry-view-dialog {
  width: min(94vw, 760px);
  max-height: min(86vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.entry-edit-dialog {
  width: min(94vw, 720px);
  max-height: min(88vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.busorder-shift-dialog {
  width: min(96vw, 1280px);
  max-height: min(88vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.busorder-shift-bus {
  margin: 6px 0 14px;
  color: #607266;
  font-weight: 700;
}

.busorder-shift-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  min-height: 0;
}

.busorder-shift-list-wrap {
  max-height: 548px;
  overflow: auto;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 14px;
  background: #ffffff;
}

.busorder-shift-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.busorder-shift-table th,
.busorder-shift-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(236, 229, 214, 0.95);
  text-align: left;
}

.busorder-shift-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfaf7;
  color: #243640;
}

.busorder-shift-table td:nth-child(2),
.busorder-shift-table th:nth-child(2) {
  width: 150px;
  min-width: 150px;
  white-space: nowrap;
}

.busorder-shift-table td:last-child,
.busorder-shift-table th:last-child {
  width: 130px;
  text-align: center;
}

.busorder-shift-new-value {
  color: #0f5870;
  font-weight: 800;
  background: rgba(237, 246, 238, 0.86);
}

.busorder-shift-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: start;
  padding: 14px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 16px;
  background: rgba(237, 246, 238, 0.82);
}

.busorder-shift-controls p {
  margin: 0;
  color: #4b5d55;
  line-height: 1.45;
}

.busorder-shift-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(151, 180, 157, 0.32);
  border-radius: 10px;
  background: #ffffff;
  color: #243640;
  font-weight: 650;
}

.busorder-shift-check input {
  width: 16px;
  height: 16px;
  accent-color: #0f5870;
}

.busorder-shift-actions {
  margin-top: 4px;
}

.entry-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.entry-view-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: #ffffff;
  color: #243640;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.entry-view-content {
  margin-top: 14px;
  overflow: auto;
  padding-right: 4px;
}

.entry-edit-content {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  overflow: auto;
  padding: 2px 4px 2px 0;
}

.entry-notes-input {
  min-height: 96px;
  height: auto;
  padding-top: 10px;
  resize: vertical;
  line-height: 1.4;
}

.entry-detail-list {
  display: grid;
  gap: 8px;
}

.entry-detail-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.36fr) 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid rgba(213, 199, 173, 0.62);
  border-radius: 12px;
  background: #ffffff;
}

.entry-detail-row span {
  color: #66776f;
  font-size: 0.86rem;
}

.entry-detail-row strong {
  color: #223744;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.entry-photo-section {
  margin-top: 18px;
}

.entry-photo-section h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  color: #243640;
}

.entry-photo-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entry-photo-item {
  position: relative;
  margin: 0;
  border: 1px solid rgba(213, 199, 173, 0.62);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

.entry-photo-item:not(:last-child) {
  margin-bottom: 14px;
}

.entry-photo-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(151, 180, 157, 0.72), transparent);
}

.entry-photo-item img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  background: #f7faf7;
}

.entry-photo-item figcaption {
  display: grid;
  gap: 8px;
  padding: 10px;
  color: #66776f;
  font-size: 0.84rem;
}

.entry-photo-edit-item figcaption {
  display: grid;
  gap: 8px;
}

.entry-photo-edit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.entry-photo-edit-item .mini-action {
  min-width: 92px;
  height: 32px;
}

.entry-photo-meta-box {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(151, 180, 157, 0.36);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.7);
}

.entry-photo-meta-box p {
  display: grid;
  grid-template-columns: minmax(110px, 0.32fr) 1fr;
  gap: 10px;
  margin: 0;
}

.entry-photo-meta-box span {
  color: #66776f;
}

.entry-photo-meta-box strong {
  color: #243640;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.entry-status-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.7);
}

.entry-status-field legend {
  padding: 0 6px;
  color: #1f3140;
  font-size: 0.95rem;
}

.entry-status-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.entry-status-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(151, 180, 157, 0.32);
  border-radius: 10px;
  background: #ffffff;
  color: #243640;
  font-weight: 650;
}

.entry-status-option input {
  width: 16px;
  height: 16px;
  accent-color: #0f5870;
}

.frame-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid rgba(236, 229, 214, 0.95);
  background: #ffffff;
  color: #243640;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.frame-toggle-icon {
  font-size: 1rem;
  color: #51625c;
}

.collapsible-panel {
  padding: 16px;
}

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

.subsection-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #243640;
}

.component-editor-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.component-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.component-fields-bus {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.inline-actions {
  display: flex;
  gap: 10px;
}

.inline-hint {
  margin: 6px 0 0;
  color: #66776f;
  font-size: 0.92rem;
}

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

.standard-import-info {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.standard-import-info p {
  margin: 0;
  color: #4b5d55;
}

.standard-import-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.standard-import-columns span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: #ffffff;
  color: #607266;
}

.standard-import-columns strong {
  color: #223744;
}

.duplicate-dialog {
  width: min(94vw, 900px);
  max-height: min(88vh, 820px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.floorplan-manual-dialog {
  width: min(94vw, 760px);
  max-height: min(88vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.floorplan-manual-list {
  display: grid;
  gap: 10px;
  max-height: 48vh;
  overflow: auto;
  margin: 12px 0 18px;
  padding-right: 4px;
}

.floorplan-manual-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 180px);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.65);
}

.floorplan-manual-row span {
  display: grid;
  gap: 3px;
}

.floorplan-manual-row small {
  color: #63746d;
}

.floorplan-delete-all,
.floorplan-delete-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.floorplan-delete-all {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.75);
  font-weight: 800;
}

.floorplan-delete-row {
  padding: 10px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: #ffffff;
}

.floorplan-delete-row span {
  display: grid;
  gap: 3px;
}

.floorplan-delete-row small {
  color: #63746d;
}

.floorplan-upload-row {
  margin-top: 14px;
}

.grundriss-workspace {
  gap: 12px;
}

body.grundrisse-page {
  overflow: hidden;
}

.grundrisse-page .shell {
  min-height: 0;
  height: calc(100vh - 36px);
}

.grundrisse-page .content {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.grundrisse-page .workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
}

.grundrisse-page .sidebar {
  position: relative;
  min-height: 0;
  height: 100%;
  align-self: start;
}

.grundriss-filter-card {
  display: grid;
  grid-template-columns: minmax(220px, 420px) 1fr;
  gap: 16px;
  align-items: end;
}

.grundriss-top-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: end;
}

.grundriss-top-filters {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 0.7fr;
  gap: 12px;
  min-width: 0;
}

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

.grundriss-pin-summary .summary-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 14px;
  padding: 12px 14px;
}

.grundriss-pin-summary .summary-card span {
  display: block;
  color: #5f7068;
  font-size: 12px;
  margin-bottom: 6px;
}

.grundriss-pin-summary .summary-card strong {
  color: #102634;
  font-size: 22px;
  line-height: 1;
}

@media (max-width: 1320px) {
  .grundriss-top-card {
    grid-template-columns: 1fr;
  }

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

.grundriss-card {
  padding: 14px;
  flex: 1 1 auto;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.grundrisse-page .grundriss-card {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) minmax(140px, 24vh);
  gap: 10px;
}

.monteur-page-shell.grundrisse-page {
  overflow: auto;
}

.monteur-page-shell.grundrisse-page .monteur-card {
  min-height: auto;
}

.monteur-page-shell.grundrisse-page .workspace {
  height: auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
}

.monteur-page-shell.grundrisse-page .workspace-header {
  align-items: flex-start;
}

.monteur-page-shell.grundrisse-page .grundriss-card {
  height: auto;
  min-height: auto;
  overflow: visible;
  display: grid;
  grid-template-rows: auto auto auto;
}

.monteur-page-shell.grundrisse-page .aks-project-card,
.monteur-page-shell.grundrisse-page .aks-filter-card,
.monteur-page-shell.grundrisse-page .aks-table-card {
  border-radius: 14px;
  padding: 8px;
}

.monteur-page-shell.grundrisse-page .plan-stage {
  height: min(68vh, 900px);
  min-height: 520px;
  overflow: hidden;
}

.monteur-page-shell.grundrisse-page .plan-scroll {
  overflow: hidden;
}

.monteur-page-shell.grundrisse-page .plan-list {
  max-height: none;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
}

.monteur-page-shell.grundrisse-page .header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.monteur-page-shell.grundrisse-page .grundriss-top-card,
.monteur-page-shell.grundrisse-page .grundriss-filter-card {
  grid-template-columns: 1fr;
}

.monteur-page-shell.grundrisse-page .grundriss-top-filters {
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr) minmax(160px, 0.8fr);
}

.monteur-page-shell.grundrisse-page .workspace-title-large {
  font-size: 0.98rem;
}

.monteur-page-shell.grundrisse-page .aks-header-button {
  min-width: auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.85rem;
}

.monteur-page-shell.grundrisse-page .field-label {
  font-size: 0.76rem;
}

.monteur-page-shell.grundrisse-page .field-input,
.monteur-page-shell.grundrisse-page .readonly-value {
  height: 30px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 0.8rem;
}

.monteur-page-shell.grundrisse-page .grundriss-top-filters {
  gap: 8px;
}

.monteur-page-shell.grundrisse-page .grundriss-pin-summary {
  gap: 8px;
}

.monteur-page-shell.grundrisse-page .grundriss-pin-summary .summary-card {
  border-radius: 10px;
  padding: 8px 10px;
}

.monteur-page-shell.grundrisse-page .grundriss-pin-summary .summary-card span {
  font-size: 0.68rem;
  margin-bottom: 4px;
}

.monteur-page-shell.grundrisse-page .grundriss-pin-summary .summary-card strong {
  font-size: 0.95rem;
}

.monteur-page-shell.grundrisse-page .inline-hint {
  font-size: 0.74rem;
}

.monteur-page-shell.grundrisse-page .plan-legend {
  gap: 8px;
}

.monteur-page-shell.grundrisse-page .plan-legend-item {
  font-size: 0.78rem;
  padding: 6px 10px;
}

.monteur-page-shell.grundrisse-page .plan-list-item {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.8rem;
}

.monteur-page-shell.grundrisse-page .plan-list-item span {
  font-size: 0.68rem;
}

.monteur-barcode-workspace {
  gap: 10px;
}

.monteur-barcode-top-card {
  border-radius: 14px;
  padding: 8px;
}

.monteur-barcode-projectline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monteur-barcode-projectline .workspace-title-large {
  font-size: 0.98rem;
}

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

.monteur-barcode-panel {
  border-radius: 14px;
  padding: 10px;
}

.monteur-barcode-camera {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.monteur-barcode-page.is-manual-mode .monteur-barcode-camera {
  display: none !important;
}

.monteur-barcode-camera-actions,
.monteur-barcode-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.monteur-barcode-page .action-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.monteur-inline-file {
  position: relative;
  overflow: hidden;
}

.monteur-inline-file input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.monteur-camera-frame {
  position: relative;
  height: 360px;
  min-height: 360px;
  max-height: 360px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 12px;
  background: #eef6f0;
  overflow: hidden;
}

.monteur-camera-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #d9e7dc;
}

.monteur-camera-frame .viewport,
.monteur-camera-frame .viewport video,
.monteur-camera-frame .viewport canvas,
.monteur-camera-frame .drawingBuffer,
.monteur-camera-frame canvas {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.monteur-camera-overlay {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #315340;
  font-size: 0.76rem;
  font-weight: 650;
  z-index: 6;
}

.monteur-camera-scanzone {
  position: absolute;
  left: 14%;
  right: 14%;
  top: 34%;
  height: 22%;
  border: 3px solid rgba(213, 57, 57, 0.96);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(12, 21, 16, 0.16);
  pointer-events: none;
  z-index: 5;
}

.monteur-camera-scanline {
  position: absolute;
  left: 3%;
  right: 3%;
  top: 50%;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(221, 27, 27, 0.95), rgba(255, 255, 255, 0));
  box-shadow: 0 0 10px rgba(221, 27, 27, 0.55);
  animation: monteur-scanline 2.2s linear infinite;
}

.monteur-camera-scanlabel {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #8e2121;
  font-size: 0.72rem;
  font-weight: 700;
}

.monteur-capture-preview {
  display: grid;
  gap: 6px;
}

.monteur-capture-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

@keyframes monteur-scanline {
  0% {
    top: 10%;
  }
  50% {
    top: 82%;
  }
  100% {
    top: 10%;
  }
}

.monteur-barcode-page .field-label {
  font-size: 0.76rem;
}

.monteur-barcode-page .field-input,
.monteur-barcode-page .readonly-value {
  height: 30px;
  border-radius: 8px;
  padding: 0 9px;
  font-size: 0.8rem;
}

.monteur-barcode-notes {
  min-height: 92px;
  height: auto !important;
  padding-top: 8px !important;
  resize: vertical;
}

.monteur-barcode-summary {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.monteur-barcode-summary p {
  margin: 0;
  display: grid;
  gap: 2px;
}

.monteur-barcode-summary span,
.monteur-barcode-warning,
.monteur-search-result span {
  color: #5a6f63;
  font-size: 0.74rem;
}

.monteur-barcode-summary strong,
.monteur-search-result strong {
  color: #18313b;
  font-size: 0.82rem;
}

.monteur-barcode-warning {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(201, 174, 129, 0.48);
  background: rgba(255, 248, 235, 0.9);
}

.monteur-barcode-warning ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

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

.monteur-search-results {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin-top: 6px;
}

.monteur-search-result {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 10px;
  background: #ffffff;
  padding: 8px 10px;
  cursor: pointer;
}

.monteur-search-result.is-active {
  border-color: rgba(12, 94, 113, 0.45);
  background: rgba(12, 94, 113, 0.09);
}

.monteur-search-result:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.plan-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: 100%;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(204, 219, 207, 0.95);
  background: #edf6ee;
  overscroll-behavior: contain;
  touch-action: none;
  contain: layout paint;
}

.plan-scroll {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #e5efe7;
  cursor: grab;
  overscroll-behavior: contain;
  touch-action: none;
}

.plan-scroll::before {
  content: "Kein Grundriss fuer diese Auswahl geladen.";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #607266;
  font-weight: 700;
  pointer-events: none;
}

.plan-scroll:has(.plan-tile)::before {
  content: "";
}

.plan-stage.is-pin-mode,
.plan-stage.is-pin-mode .plan-scroll,
.plan-stage.is-pin-mode .plan-overlay {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='translate(16 4) rotate(45)'%3E%3Cpath d='M0 0 C5 0 9 4 9 9 C9 15 0 25 0 25 C0 25 -9 15 -9 9 C-9 4 -5 0 0 0Z' fill='%23e01818' stroke='%23a80000' stroke-width='2'/%3E%3Ccircle cx='0' cy='8' r='3' fill='white'/%3E%3C/g%3E%3C/svg%3E") 16 28, crosshair;
}

.plan-stage.is-pin-mode .plan-pin-callout,
.plan-stage.is-pin-mode .plan-pin-anchor {
  cursor: inherit;
}

.plan-scroll.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.plan-scroll.is-dragging * {
  user-select: none;
}

.plan-surface {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  contain: layout paint;
  transform-origin: 0 0;
  will-change: transform;
}

.plan-canvas {
  display: none;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(17, 44, 28, 0.12);
  transform: translateZ(0);
  will-change: width, height;
}

.plan-tile-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.plan-tile {
  position: absolute;
  display: block;
  background: #ffffff;
  image-rendering: auto;
}

.plan-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: auto;
  overflow: hidden;
  transform: translateZ(0);
  will-change: width, height;
}

.plan-placement-hint {
  position: sticky;
  top: 14px;
  left: 14px;
  z-index: 10;
  display: inline-flex;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(12, 94, 113, 0.92);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(12, 94, 113, 0.22);
}

.plan-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px;
}

.plan-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
}

.plan-legend-item.has-barcode {
  background: rgba(66, 143, 101, 0.12);
  border-color: rgba(66, 143, 101, 0.24);
}

.plan-legend-item.no-barcode {
  background: rgba(127, 86, 217, 0.12);
  border-color: rgba(127, 86, 217, 0.22);
}

.plan-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.plan-legend-item.has-barcode .plan-legend-swatch {
  background: rgba(66, 143, 101, 0.78);
}

.plan-legend-item.no-barcode .plan-legend-swatch {
  background: rgba(127, 86, 217, 0.78);
}

.plan-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.plan-legend .aks-header-button {
  min-height: 36px;
  padding-inline: 12px;
}

.plan-pin {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.plan-pin-anchor {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50% 50% 50% 0;
  background: #e01818;
  border: 2px solid #a80000;
  box-shadow: 0 3px 7px rgba(120, 0, 0, 0.38);
  transform: translate(-50%, -100%) rotate(-45deg);
  pointer-events: auto;
  cursor: grab;
}

.plan-pin-anchor::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  left: 50%;
  top: 50%;
  border-radius: 999px;
  background: #ffffff;
  transform: translate(-50%, -50%);
}

.plan-pin-line {
  position: absolute;
  height: 3px;
  background: #e01818;
  transform-origin: left center;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(120, 0, 0, 0.28);
}

.plan-pin-callout {
  position: absolute;
  pointer-events: auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: #ffffff;
  border: 2px solid #e01818;
  font-size: 12px;
  font-weight: 900;
  color: #000000;
  box-shadow: 0 8px 16px rgba(120, 0, 0, 0.18);
  cursor: grab;
}

.plan-pin-callout.has-barcode {
  background: #ffffff;
  border-color: #e01818;
}

.plan-pin-callout.no-barcode {
  background: #ffffff;
  border-color: #e01818;
}

.plan-pin.is-cancelled .plan-pin-callout {
  color: #b30000;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.plan-pin.active .plan-pin-anchor {
  width: 28px;
  height: 28px;
  background: #ff1f1f;
  border-color: #7f0000;
  box-shadow:
    0 0 0 8px rgba(255, 255, 255, 0.92),
    0 0 0 14px rgba(255, 31, 31, 0.45),
    0 0 34px 18px rgba(255, 31, 31, 0.42),
    0 8px 18px rgba(120, 0, 0, 0.5);
}

.plan-pin.active .plan-pin-callout {
  border-color: #a80000;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.9),
    0 0 0 8px rgba(255, 31, 31, 0.32),
    0 16px 34px rgba(168, 0, 0, 0.34);
}

.plan-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
  flex: 0 0 auto;
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  align-content: start;
  overscroll-behavior: contain;
}

.plan-list-item {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  background: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

.plan-list-item.has-barcode {
  background: rgba(66, 143, 101, 0.12);
  border-color: rgba(66, 143, 101, 0.25);
}

.plan-list-item.no-barcode {
  background: rgba(127, 86, 217, 0.12);
  border-color: rgba(127, 86, 217, 0.22);
}

.plan-list-item.pin-missing {
  color: #b30000;
}

.plan-list-item.is-cancelled strong,
.plan-list-item.is-cancelled span {
  color: #b30000;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.plan-list-item.active {
  border-color: rgba(12, 94, 113, 0.45);
  background: rgba(12, 94, 113, 0.1);
}

.plan-list-item button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.plan-list-item strong,
.plan-list-item span {
  display: block;
}

.plan-list-item span {
  margin-top: 4px;
  color: #5f7068;
  font-size: 12px;
}

.plan-empty {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px dashed rgba(204, 219, 207, 0.95);
  border-radius: 14px;
  color: #63746d;
}

.duplicate-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  overflow: auto;
  padding-right: 4px;
}

.duplicate-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.35fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: #ffffff;
}

.duplicate-row span {
  display: grid;
  gap: 4px;
}

.duplicate-row small {
  color: #607266;
}

.import-top-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.import-upload-grid {
  grid-template-columns: minmax(260px, 1fr) auto auto minmax(260px, 0.7fr);
}

.import-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.import-row {
  display: grid;
  grid-template-columns: 70px 42px minmax(160px, 0.75fr) minmax(180px, 0.85fr) minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.import-position {
  text-align: center;
}

.import-checkbox {
  display: grid;
  place-items: center;
  height: 38px;
  border: 1px solid rgba(212, 198, 171, 0.92);
  border-radius: 10px;
  background: #ffffff;
}

.excel-preview {
  padding: 16px;
  overflow-x: auto;
}

.column-picker {
  padding: 0 16px 16px;
}

.column-picker-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.column-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(213, 199, 173, 0.85);
  border-radius: 12px;
  background: #ffffff;
  color: #102329;
  font-weight: 650;
  cursor: pointer;
}

.column-picker-item input {
  width: 16px;
  height: 16px;
  accent-color: #0c5f76;
}

.aks-workspace {
  gap: 14px;
  height: 100%;
  min-height: 0;
}

.aks-project-card,
.aks-head-card,
.aks-filter-card,
.aks-table-card {
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 18px;
}

.aks-project-card,
.aks-head-card {
  padding: 14px;
}

.aks-project-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.aks-project-select-field {
  width: min(100%, 520px);
}

.aks-project-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.aks-summary-title {
  margin: 0 0 12px;
  color: #243640;
  font-size: 1rem;
  font-weight: 800;
}

.aks-filter-card,
.aks-table-card {
  background: #ffffff;
}

.aks-filter-card {
  padding: 14px;
}

.aks-head-grid {
  display: block;
}

.aks-stat-frames {
  display: grid;
  grid-template-columns: minmax(500px, 560px) minmax(290px, 330px) minmax(360px, 390px) minmax(380px, 430px);
  gap: 16px;
  align-items: stretch;
  justify-content: start;
  overflow-x: auto;
  padding-bottom: 2px;
}

.aks-stat-frame {
  min-height: 164px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.aks-stat-frame-ringbus {
  min-width: 360px;
}

.aks-stat-frame-title {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #243640;
}

.aks-stat-frame-body {
  background: rgba(237, 246, 238, 0.82);
  border-radius: 14px;
  padding: 12px;
}

.aks-damper-layout,
.aks-stat-damper-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(130px, 0.35fr);
  gap: 20px;
  align-items: start;
}

.aks-stat-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 8px;
}

.aks-stat-coupler-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  align-items: start;
}

.aks-stat-module-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(130px, 1fr));
  gap: 8px;
  align-items: start;
}

.aks-ringbus-list {
  display: grid;
  gap: 2px;
  max-height: 152px;
  overflow: auto;
  padding: 8px;
}

.ringbus-summary-header,
.ringbus-summary-row {
  display: grid;
  grid-template-columns: minmax(78px, 1fr) 76px repeat(3, 42px);
  gap: 4px;
  align-items: center;
}

.ringbus-summary-header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 22px;
  padding: 0 2px 3px;
  background: rgba(237, 246, 238, 0.95);
  color: #66776f;
  font-size: 0.66rem;
  font-weight: 750;
}

.ringbus-summary-row {
  min-height: 24px;
  padding: 2px;
  border-radius: 7px;
}

.ringbus-summary-row > * {
  display: flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 4px;
  border-radius: 7px;
  color: #243640;
  font-size: 0.72rem;
}

.ringbus-summary-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ringbus-summary-status {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  border-radius: 999px;
  background: var(--ringbus-progress-color);
  color: transparent;
  justify-content: center;
  justify-self: center;
  transition: background-color 380ms ease;
}

.ringbus-summary-row strong {
  justify-content: center;
  font-size: 0.74rem;
}

.aks-stat-card {
  min-height: 50px;
  padding: 8px 10px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}

.aks-stat-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  color: #66776f;
}

.aks-stat-card strong {
  font-size: 0.98rem;
  color: #223744;
}

.aks-big-stat {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: #ffffff;
  color: #223744;
  padding: 8px 10px;
  text-align: center;
}

.aks-big-stat span {
  color: #243640;
  font-size: 0.92rem;
  font-weight: 700;
}

.aks-big-stat strong {
  font-size: 0.98rem;
  color: #223744;
}

.aks-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.35fr) minmax(150px, 0.78fr) minmax(210px, 1fr) minmax(145px, 0.7fr) minmax(92px, 0.42fr) minmax(92px, 0.42fr) 70px minmax(150px, 0.72fr);
  gap: 12px;
}

.busorder-shift-field {
  align-items: stretch;
}

.busorder-shift-open {
  width: 42px;
  height: 38px;
  justify-self: start;
}

.aks-table-card {
  padding: 14px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.aks-table-toolbar {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  justify-items: start;
  justify-content: space-between;
  gap: 14px;
  min-height: 34px;
}

.aks-filter-count {
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(151, 180, 157, 0.38);
  border-radius: 999px;
  background: rgba(237, 246, 238, 0.9);
  color: #315340;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  justify-self: center;
}

.aks-filter-tools {
  display: inline-flex;
  align-items: center;
  justify-self: center;
  gap: 8px;
}

.history-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(151, 180, 157, 0.5);
  border-radius: 50%;
  background: #ffffff;
  color: #0f5870;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.history-button:hover:not(:disabled) {
  background: rgba(237, 246, 238, 0.95);
}

.history-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.sort-order-button {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 2px;
  place-items: center;
  width: 34px;
  height: 30px;
  border: 1px solid rgba(151, 180, 157, 0.5);
  border-radius: 9px;
  background: #ffffff;
  color: #0f5870;
  cursor: pointer;
}

.sort-order-button span {
  display: grid;
  gap: 0;
  line-height: 0.78;
  font-size: 0.68rem;
  font-weight: 800;
}

.sort-order-button strong {
  font-size: 0.86rem;
  line-height: 1;
}

.sort-order-button:hover,
.sort-order-button-active {
  background: rgba(237, 246, 238, 0.95);
  border-color: rgba(15, 88, 112, 0.45);
  box-shadow: 0 0 0 2px rgba(190, 220, 196, 0.26);
}

.aks-add-menu-wrap {
  position: relative;
  justify-self: end;
}

.aks-add-button {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(151, 180, 157, 0.5);
  border-radius: 10px;
  background: #ffffff;
  color: #244132;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.aks-add-button:hover {
  background: rgba(237, 246, 238, 0.95);
}

.aks-add-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 260px;
  padding: 8px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(114, 128, 118, 0.16);
}

.aks-add-menu[hidden] {
  display: none !important;
}

.aks-add-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #243640;
  text-align: left;
  padding: 0 10px;
  font-weight: 650;
  cursor: pointer;
}

.aks-add-menu button:hover {
  background: rgba(183, 208, 188, 0.22);
}

.aks-table-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 14px;
  background: #ffffff;
}

.monteur-aks-page .aks-table-wrap {
  max-height: min(54vh, 980px);
  min-height: 0;
}

.monteur-aks-page .aks-table-card {
  max-height: min(62vh, 1120px);
}

.monteur-aks-page .aks-table-toolbar {
  grid-template-columns: 1fr auto;
}

.monteur-aks-page .aks-filter-tools .history-button {
  display: none;
}

.monteur-aks-page .aks-table .aks-action-buttons {
  justify-content: center;
}

.monteur-aks-page .aks-table td:nth-child(2) {
  font-weight: 650;
}

.monteur-aks-page .aks-table td:nth-child(3) {
  color: var(--text-soft);
}

.monteur-aks-page .aks-table td:nth-child(4),
.monteur-aks-page .aks-table td:nth-child(5),
.monteur-aks-page .aks-table td:nth-child(6),
.monteur-aks-page .aks-table td:nth-child(7) {
  white-space: nowrap;
}

.monteur-aks-page .aks-project-select-field {
  width: min(100%, 420px);
}

.monteur-aks-page .aks-project-card {
  gap: 10px;
}

.monteur-aks-page .aks-filter-count {
  padding: 4px 10px;
  min-height: 24px;
}

.monteur-aks-page .aks-table-card {
  padding-top: 6px;
}

.aks-table {
  width: 100%;
  min-width: 1300px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.aks-table th,
.aks-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(236, 229, 214, 0.95);
  text-align: left;
  vertical-align: middle;
}

.aks-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfaf7;
  color: #243640;
  font-weight: 700;
}

.aks-table th:first-child,
.aks-table td:first-child {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  text-align: center;
}

.aks-row-number {
  color: #607266;
  font-weight: 800;
}

.aks-table tbody tr.no-barcode {
  background: rgba(230, 222, 244, 0.9);
}

.aks-table tbody tr.has-barcode {
  background: rgba(225, 243, 229, 0.9);
}

.aks-table-select,
.aks-table-input {
  width: 100%;
  min-width: 110px;
  height: 34px;
  border: 1px solid rgba(212, 198, 171, 0.92);
  border-radius: 9px;
  background: #ffffff;
  padding: 0 10px;
  color: #223744;
}

.aks-table-input {
  min-width: 68px;
  text-align: center;
}

.aks-table-order-input {
  width: 58px;
  min-width: 58px;
  max-width: 58px;
}

.aks-table-barcode-input {
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  text-align: center;
  letter-spacing: 0.02em;
}

.aks-table-motor-input,
.aks-table-motor-select {
  width: 78px;
  min-width: 78px;
  max-width: 92px;
  text-align: center;
}

.aks-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef1f4;
  color: #5d6973;
  font-size: 0.78rem;
  font-weight: 700;
}

.aks-status-pill.montiert,
.aks-status-pill.fertig {
  background: #dff4e6;
  color: #1f7d45;
}

.aks-status-pill.nur-koppler-montiert {
  background: #e8f3f7;
  color: #0f5f75;
}

.aks-status-pill.keine-bsk-verbaut,
.aks-status-pill.keine-revision,
.aks-status-pill.kabel-fehlen,
.aks-status-pill.nicht-zugaenglich {
  background: #f7efe0;
  color: #9a5f00;
}

.aks-status-pill.entfallen {
  background: #f1eeee;
  color: #7b4949;
}

.aks-table tbody tr.is-cancelled td:not(:last-child) {
  text-decoration: line-through;
  color: #7e8682;
}

.aks-table tbody tr.is-cancelled {
  background: rgba(238, 238, 232, 0.92);
}

.aks-action-buttons {
  display: flex;
  gap: 8px;
}

.aks-header-button {
  min-width: auto;
  padding-inline: 14px;
}

.export-dialog {
  width: min(92vw, 560px);
}

.export-warning-dialog {
  width: min(92vw, 680px);
}

.export-all-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(204, 219, 207, 0.95);
  border-radius: 12px;
  background: rgba(237, 246, 238, 0.82);
  font-weight: 800;
  color: #18352e;
}

.export-warning-list {
  display: grid;
  gap: 10px;
  max-height: min(44vh, 360px);
  overflow: auto;
  margin: 14px 0;
}

.export-warning-item {
  padding: 12px 14px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 14px;
  background: rgba(255, 250, 240, 0.92);
  color: #223744;
}

.export-warning-item strong {
  display: block;
  margin-bottom: 4px;
}

.export-warning-item span {
  display: block;
  color: #617176;
  font-size: 12px;
  line-height: 1.45;
}

.export-warning-actions {
  flex-wrap: wrap;
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.9rem;
}

.preview-table th,
.preview-table td {
  max-width: 260px;
  padding: 9px 10px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-table th {
  color: #233944;
  background: #f8faf8;
  font-weight: 700;
}

.icon-action {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: #ffffff;
  color: #243640;
  font-size: 1rem;
  cursor: pointer;
}

.icon-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
  font-size: 1rem;
}

.icon-action-primary {
  background: #eef6f0;
}

.saved-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.saved-item-row,
.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.saved-item,
.user-item {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 12px;
  background: #ffffff;
  color: #243640;
  text-align: left;
  cursor: pointer;
}

.saved-item-project {
  font-weight: 600;
}

.saved-item-name {
  color: #5a6762;
}

.row-delete-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: #ffffff;
  color: #9d3b3b;
  cursor: pointer;
}

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

.mini-action {
  min-width: 92px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(213, 199, 173, 0.75);
  border-radius: 10px;
  background: #ffffff;
  color: #243640;
  cursor: pointer;
}

.mini-action-active {
  background: #eef6f0;
  color: #1a5e3a;
}

.mini-action-danger {
  color: #9d3b3b;
}

.saved-items-empty {
  margin: 0;
  padding: 10px 2px 2px;
  color: #7a827f;
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  body {
    padding: 12px;
  }

  .shell {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 24px);
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(122, 156, 129, 0.18);
  }

  .sidebar::after {
    inset: auto 22px 0;
  }

  .content {
    padding: 18px;
  }

  .monteur-body {
    padding: 14px;
  }

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

  .monteur-header {
    gap: 18px;
  }

  .monteur-header-copy {
    grid-template-columns: 1fr;
  }

  .monteur-logo {
    width: min(220px, 100%);
  }

  .monteur-subpage-header .monteur-logo {
    width: 82px;
  }

  .monteur-header-actions-compact {
    align-items: stretch;
  }

  .monteur-header-user {
    text-align: left;
  }

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

  .monteur-inline-actions {
    flex-direction: column;
  }

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

  .monteur-page-shell.grundrisse-page .grundriss-top-filters,
  .monteur-page-shell.grundrisse-page .grundriss-pin-summary {
    grid-template-columns: 1fr;
  }

  .monteur-page-shell.grundrisse-page .plan-stage {
    height: 58vh;
    min-height: 360px;
  }

  .monteur-page-shell.grundrisse-page .plan-list {
    grid-template-columns: 1fr;
  }

  .workspace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .project-form,
  .user-form,
  .component-fields,
  .component-fields-bus {
    grid-template-columns: 1fr;
  }

  .form-actions,
  .component-editor-row,
  .inline-actions,
  .subsection-head,
  .confirm-actions,
  .user-row-actions,
  .import-summary,
  .import-section-header {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .import-top-grid,
  .import-row,
  .aks-head-grid,
  .aks-stat-frames,
  .aks-stat-grid,
  .aks-filter-grid {
    grid-template-columns: 1fr;
  }

  .aks-stat-frames {
    overflow-x: visible;
  }

  .aks-stat-frame-ringbus {
    min-width: 0;
  }

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

  .action-button,
  .icon-action,
  .saved-item,
  .row-delete-button,
  .mini-action {
    width: 100%;
  }

  .saved-item-row,
  .saved-item,
  .user-row {
    grid-template-columns: 1fr;
  }
}
