/* JLCA-905: Placeholder for UI application styles (loaded via /static/assets/app.css)
   This file is intentionally minimal; extend as needed. */
/* JLCA-907: Include local vendor Bootstrap Icons (no CDN) */
@import url("../vendor/bootstrap-icons/bootstrap-icons.css");

/* JLCA-913: Komponenten-Styles im Weiß/Grau-Theme */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--fg);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  font-weight: 500;
}
.btn:hover {
  background: var(--gray-100);
}
.btn:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-primary {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}
.btn-primary:hover {
  background: #1a60d1;
  border-color: #1a60d1;
}
.btn-primary:active {
  background: #1757c0;
  border-color: #1757c0;
}
.btn-primary:disabled {
  background: #8db5ff;
  border-color: #8db5ff;
}

.btn-secondary {
  background: #6e7781;
  border-color: #6e7781;
  color: #fff;
}
.btn-secondary:hover {
  background: #5d656e;
  border-color: #5d656e;
}
.btn-secondary:active {
  background: #535a62;
  border-color: #535a62;
}

.btn-outline {
  background: transparent;
  color: #24292f;
  border-color: var(--gray-300);
}
.btn-outline:hover {
  background: var(--gray-100);
}
.btn-outline:active {
  background: #eaeef2;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  background: var(--gray-100);
  color: #57606a;
  border: 1px solid var(--gray-300);
}
.badge-primary {
  background: #ddf4ff;
  color: #0969da;
  border-color: #54aeff;
}
.badge-secondary {
  background: #f6f8fa;
  color: #57606a;
  border-color: var(--gray-300);
}

.alert {
  background: #fff;
  border: 1px solid var(--gray-300);
  border-left: 4px solid #1f6feb;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  color: var(--fg);
}
.alert-success {
  border-left-color: #2e7d32;
}
.alert-error {
  border-left-color: #d32f2f;
}
.alert-info {
  border-left-color: #1976d2;
}
.alert-warning {
  border-left-color: #b26a00;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.card-header,
.card-footer {
  padding: 16px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}
.card-footer {
  border-top: 1px solid #e2e8f0;
  border-bottom: 0;
}
.card-body {
  padding: 20px;
}

.shadow-sm {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.shadow {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.radius-sm {
  border-radius: 4px;
}
.radius {
  border-radius: 8px;
}
.radius-lg {
  border-radius: 12px;
}

body {
  background: #f5f7fb;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.table th,
.table td {
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  text-align: left;
  vertical-align: top;
}
.table thead th {
  background: var(--gray-100);
  color: var(--fg);
}
.table-striped tbody tr:nth-child(even) {
  background: #f9fbfd;
}

.table-compact th,
.table-compact td {
  padding: 6px 8px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-responsive .table {
  min-width: 640px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 8px 10px;
  font: inherit;
  color: var(--fg);
  background: #fff;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
}
.form-control:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

.form-text {
  display: block;
  margin-top: 4px;
  color: #57606a;
  font-size: 0.875rem;
}

.is-valid,
.form-control[aria-invalid="false"] {
  border-color: #2e7d32;
}
.is-invalid,
.form-control[aria-invalid="true"] {
  border-color: #d32f2f;
}

.valid-feedback {
  display: block;
  margin-top: 4px;
  color: #2e7d32;
  font-size: 0.875rem;
}
.invalid-feedback {
  display: block;
  margin-top: 4px;
  color: #d32f2f;
  font-size: 0.875rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border: 2px dashed var(--gray-300);
  border-radius: 8px;
  background: #fff;
  color: #57606a;
  text-align: center;
}

.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.2s ease-in-out infinite;
  border-radius: 4px;
}
.skeleton.sm {
  height: 12px;
  width: 120px;
}
.skeleton.md {
  height: 16px;
  width: 200px;
}
.skeleton.lg {
  height: 20px;
  width: 100%;
}

@keyframes skeleton-loading {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.app-shell {
  flex: 1 0 auto;
  width: 100%;
}

.layout {
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 100svh;
}

.layout > main,
.layout .app-shell {
  flex: 1 0 auto;
  min-height: 0;
}

.layout > main {
  overflow-y: auto;
}

.layout > main,
.layout .app-shell {
  padding-bottom: 5rem;
}

.app-footer {
  margin-top: 0 !important;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 100;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.app-shell-workspace {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  column-gap: 0.75rem;
  row-gap: 1rem;
  overflow: visible;
  padding-bottom: 1rem;
  min-height: 0;
  max-height: 100%;
}

.app-shell-grid,
.app-shell-workspace-grid {
  align-items: stretch;
  --bs-gutter-x: 1.5rem;
}

.app-shell-grid > *,
.app-shell-workspace-grid > * {
  padding-right: calc(var(--bs-gutter-x) * 0.5);
  padding-left: calc(var(--bs-gutter-x) * 0.5);
  box-sizing: border-box;
}

.app-shell-nav,
.app-shell-workspace,
.app-shell-content,
.app-shell-context {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  align-self: stretch;
}

.app-shell-nav .app-header {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  padding-top: 1rem;
}

.app-shell-nav .navbar {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  justify-content: flex-start;
}

.app-shell-nav .navbar .container {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  align-content: flex-start;
  min-height: 0;
}

.app-shell-nav .offcanvas-body {
  flex-direction: column;
  align-content: flex-start;
}

.app-statusbar {
  display: flex;
  width: 100%;
  margin: 0;
  max-width: 100%;
  align-self: stretch;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.app-statusbar-search {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.app-statusbar-search-input {
  min-width: 0;
}

.app-statusbar-search-feedback {
  margin: 0;
  color: #57606a;
  font-size: 0.875rem;
  line-height: 1.4;
}

.app-statusbar-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}

.app-statusbar-logout-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.app-statusbar-icon-button {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
}

.app-statusbar-icon-button .bi {
  font-size: 1rem;
  line-height: 1;
}

.app-shell-nav .app-header {
  position: sticky;
  top: 1rem;
}

.app-shell-nav {
  padding-top: 0;
  margin-top: 0;
}

.app-shell-nav .navbar {
  min-height: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-shell-workspace-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-sizing: border-box;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.app-shell-workspace-grid > * {
  min-width: 0;
}

.app-shell-nav .navbar .container {
  flex-direction: column;
  align-items: stretch;
  padding: 16px;
}

.app-shell-nav .navbar-brand {
  margin-bottom: 8px;
}

.app-shell-nav .navbar-nav,
.app-shell-nav .offcanvas-body,
.app-shell-nav .header-actions {
  flex-direction: column;
  align-items: stretch;
}

.app-shell-nav .navbar-nav {
  gap: 4px;
}

.app-shell-nav .nav-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.app-shell-nav .nav-group-label {
  margin: 0 0 2px;
  padding: 0 10px;
  color: #57606a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.app-shell-nav .nav-group-separator {
  width: 100%;
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--gray-300);
}

.app-shell-nav .nav-group-secondary {
  padding-top: 2px;
}

.app-shell-nav .sidebar-user {
  width: 100%;
  margin-top: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-shell-nav .sidebar-card-title {
  margin: 4px 0 8px;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.app-shell-nav .sidebar-card-text,
.app-shell-nav .sidebar-user-detail {
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.5;
}

.app-shell-nav .sidebar-card-text {
  margin: 0 0 10px;
}

.app-shell-nav .sidebar-user .card-body {
  padding: 12px 14px;
}

.sidebar-promo-kicker,
.sidebar-promo-cta {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.sidebar-promo-kicker {
  color: #0969da;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-promo-cta {
  padding: 4px 8px;
  background: #ddf4ff;
  color: #0969da;
  border: 1px solid #54aeff;
}

.app-shell-nav .sidebar-user-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.app-shell-nav .sidebar-user-avatar {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

.app-shell-nav .sidebar-user-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-shell-nav .sidebar-user-name,
.app-shell-nav .sidebar-user-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-nav .sidebar-user-name {
  font-weight: 600;
  line-height: 1.25;
}

.app-shell-nav .header-actions {
  margin-top: 8px;
}

.app-shell-nav .icon-button {
  justify-content: flex-start;
  width: 100%;
}

.flash-container {
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--app-footer-offset, 72px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
}

.app-shell-nav .offcanvas {
  position: static;
  visibility: visible;
  transform: none;
  width: 100%;
  max-width: none;
  border: 0;
  background: transparent;
}

.app-shell-nav .offcanvas-header {
  display: none;
}

.app-shell-nav .offcanvas-body {
  display: flex;
  width: 100%;
  padding: 0;
  overflow: visible;
}

.app-shell-nav .navbar-nav,
.app-shell-nav .nav-item,
.app-shell-nav .nav-link,
.app-shell-nav .navbar-brand {
  width: 100%;
  min-width: 0;
}

.app-shell-nav .nav-link,
.app-shell-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.25;
}

.app-shell-nav .nav-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell-nav .nav-link-note {
  flex: 0 0 auto;
  margin-left: auto;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #6e7781;
  font-size: 0.75rem;
  line-height: 1.2;
}

.app-shell-nav .nav-icon {
  flex: 0 0 auto;
  margin-right: 0.5rem;
  font-size: 1rem;
  line-height: 1;
  text-align: center;
}

.app-shell-nav .nav-link:hover,
.app-shell-nav .navbar-brand:hover {
  background: #f1f5f9;
}

.app-shell-nav .nav-link:focus,
.app-shell-nav .navbar-brand:focus {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
}

.app-shell-nav .nav-link.active,
.app-shell-nav .navbar-brand.active {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #2563eb;
}

.app-shell-content,
.app-shell-context {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-shell-content {
  padding: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.app-shell-content h1 {
  font-size: 42px;
  font-weight: 700;
  line-height: 1.15;
}

.app-shell-context {
  padding: 16px;
  font-size: 15px;
  flex-direction: column;
  display: flex;
  line-height: 1.6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.app-shell-context {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.app-shell-context-stack {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.shell-context-card {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.shell-context-card .card-header {
  flex: 0 0 auto;
  padding: 12px 14px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.shell-context-card .card-body {
  flex: 0 0 auto;
  min-height: auto;
  overflow: visible;
  padding: 12px 14px;
}

.shell-recent-events-card {
  flex: 1 1 auto;
  min-height: 0;
}

.shell-context-state-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  min-width: 0;
}

.shell-context-card-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.shell-context-card-icon,
.shell-context-state-icon {
  color: #94a3b8;
}

.shell-context-card-icon {
  flex: 0 0 auto;
  font-size: 1rem;
  line-height: 1;
}

.shell-context-state-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 4px;
  align-items: start;
  min-width: 0;
}

.shell-context-state-icon {
  display: inline-flex;
  grid-row: 1 / span 2;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  font-size: 1rem;
  line-height: 1;
  flex: 0 0 auto;
}

.shell-context-state-item dt {
  grid-column: 2;
  margin: 0 0 4px;
  color: #57606a;
  font-size: 0.8125rem;
  font-weight: 600;
}

.shell-context-state-item dd {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.shell-context-state-item [data-context-state-value] {
  display: block;
  width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.app-shell-context .shell-context-copy-button {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.375rem;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.app-shell-context .shell-context-copy-button:hover {
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline;
}

.app-shell-context .shell-context-copy-button:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
  border-radius: 6px;
}

.app-shell-context .shell-context-copy-button .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.shell-recent-event {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-300);
}

.shell-recent-event:last-child {
  border-bottom: 0;
}

.shell-recent-event-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  min-width: 16px;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.shell-recent-event-content {
  min-width: 0;
}

.shell-recent-event-name {
  color: var(--fg);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}

.shell-recent-event-summary {
  margin-top: 2px;
  color: #57606a;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.shell-recent-event-timestamp {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 0.6875rem;
  line-height: 1.2;
}

.shell-recent-events-card .card-body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.shell-recent-events-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  margin: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  list-style: none;
}

body[data-page="ba-chat"] .layout {
  min-height: 100svh;
  height: auto;
  overflow: hidden;
}

body[data-page="ba-chat"] .app-shell {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body[data-page="ba-chat"] .app-shell-grid {
  flex: 1 1 auto;
  align-items: stretch;
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 1.5rem;
}

body[data-page="ba-chat"] .chat-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body[data-page="ba-chat"] .chat-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}

body[data-page="ba-chat"] .chat-reset-link:hover {
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline;
}

body[data-page="ba-chat"] .chat-reset-link:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
  border-radius: 6px;
}

body[data-page="ba-chat"] .chat-reset-link .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.app-shell-nav,
.app-shell-content,
.app-shell-context {
  min-height: 0;
  max-height: 100%;
}

.app-shell-nav .navbar,
.app-shell-nav .offcanvas-body,
.app-shell-context,
.app-shell-context-stack,
.shell-context-card,
.shell-context-card .card-body,
.shell-context-state-list,
.shell-context-state-item,
.shell-context-state-item dd,
.shell-recent-event,
.shell-recent-event-content {
  min-width: 0;
}

.app-shell-nav .app-header {
  position: static;
  top: auto;
  height: 100%;
}

.app-shell-nav .navbar {
  height: auto;
  flex: 1 1 auto;
  height: 100%;
  align-self: stretch;
}

.app-shell-nav .offcanvas-body {
  flex: 1 1 auto;
  overflow-y: auto;
}

.app-shell-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body[data-page="login"] .app-shell-nav .app-header {
  position: static;
  top: auto;
}

body[data-page="login"] .app-shell-nav .navbar {
  margin-top: 0;
}

.shell-context-card .card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.shell-context-placeholder {
  color: #57606a;
  margin-bottom: 0;
}

.app-shell-nav .navbar {
  border-color: #edf2f7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.app-shell-nav .nav-group-label {
  margin: 0 0 4px;
  color: #94a3b8;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.app-shell-nav .nav-group-separator {
  margin: 24px 0;
  border-top-color: #edf2f7;
}

.app-shell-nav .nav-group-secondary {
  padding-top: 0;
}

.app-shell-nav .sidebar-user,
.app-shell-content,
.app-shell-context,
.shell-context-card {
  border-color: #edf2f7;
}

.app-shell-nav .nav-link.active,
.app-shell-nav .navbar-brand.active {
  background: #eaf2ff;
  box-shadow: inset 2px 0 0 #3b82f6;
}

.app-shell-nav .nav-link-note {
  color: #94a3b8;
  font-size: 11px;
}

.app-shell-content,
.app-shell-context {
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.shell-context-card {
  border-color: #edf2f7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.app-shell-context-stack {
  gap: 20px;
}

.shell-context-card .card-header {
  border-bottom-color: #edf2f7;
}

.shell-context-card .card-header h3 {
  font-size: 0.9375rem;
}

.shell-context-state-item dt {
  color: #94a3b8;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.shell-context-state-item [data-context-state-value] {
  font-size: 16px;
  font-weight: 500;
}

.shell-context-state-item[data-context-state-field="repo_root"]
  [data-context-state-value] {
  color: #64748b;
  font-size: 0.875rem;
}

.app-footer {
  color: #94a3b8;
  font-size: 0.8125rem;
  line-height: 1.4;
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.app-footer .small,
.app-footer small {
  font-size: inherit;
}

.home-startpage {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-startpage-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-startpage-kicker {
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.home-startpage-description {
  max-width: 720px;
  margin: 0;
  color: #64748b;
}

.home-upgrade-card {
  border-color: #e7edf5;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.ba-chat-quick-actions {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.ba-chat-quick-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-height: 140px;
  padding: 20px;
  border: 1px solid #e7edf5;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  cursor: pointer;
  text-align: left;
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    border-color 150ms ease;
}

.ba-chat-quick-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.ba-chat-quick-action:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 3px;
}

.ba-chat-quick-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #334155;
}

.ba-chat-quick-action__icon .bi {
  font-size: 18px;
  line-height: 1;
}

.ba-chat-quick-action__icon--idea {
  background: #eef2ff;
}

.ba-chat-quick-action__icon--jira {
  background: #ecfeff;
}

.ba-chat-quick-action__icon--repo {
  background: #fff7ed;
}

.ba-chat-quick-action__icon--tests {
  background: #eff6ff;
}

.ba-chat-quick-action__icon--more {
  background: #f8fafc;
}

.ba-chat-quick-action__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.ba-chat-quick-action__title {
  margin-top: 16px;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.ba-chat-quick-action__description {
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.ba-chat-quick-action__arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
}

.workspaces-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workspace-panel {
  border-color: #edf2f7;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.workspace-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.workspace-header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  text-decoration: none;
}

.workspace-header-link:hover {
  background: transparent;
  color: #1d4ed8;
  text-decoration: underline;
}

.workspace-header-link:focus-visible {
  outline: 2px solid #1f6feb;
  outline-offset: 2px;
  border-radius: 6px;
}

.workspace-header-link .bi {
  font-size: 0.95rem;
  line-height: 1;
}

.workspace-page-feedback {
  margin-bottom: 16px;
}

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

.workspace-state {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
}

.workspace-state--empty {
  background: #f8fafc;
}

.workspace-state--error {
  background: #fff5f5;
  border-color: #f3c4c4;
}

.workspace-state__title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.workspace-state__message,
.workspace-row__meta {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.workspace-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e7edf5;
  border-radius: 12px;
  background: #fff;
}

.workspace-row__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-row__action {
  min-width: 168px;
}

.workspace-row__feedback {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 0.875rem;
  line-height: 1.4;
}

.workspace-row__feedback[hidden] {
  display: none;
}

.workspace-row__feedback--success {
  color: #2e7d32;
}

.workspace-row__feedback--error {
  color: #b42318;
}

.workspace-row__action.is-loading {
  opacity: 0.75;
}

.workspace-row__action.is-loading::after {
  content: "…";
}

.workspace-row__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.workspace-row__title {
  color: #0f172a;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.workspace-row__description {
  margin: 0;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.workspace-clone-dialog {
  position: fixed;
  inset: 0;
  z-index: 1050;
}

.workspace-clone-dialog[hidden] {
  display: none;
}

.workspace-clone-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.workspace-clone-dialog__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 520px);
  margin: 8vh auto 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.workspace-clone-dialog__header,
.workspace-clone-dialog__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workspace-clone-dialog__header {
  margin-bottom: 12px;
}

.workspace-clone-dialog__header h2,
.workspace-clone-dialog__description,
.workspace-clone-dialog__workspace,
.workspace-clone-dialog__hint {
  margin: 0;
}

.workspace-clone-dialog__description,
.workspace-clone-dialog__workspace,
.workspace-clone-dialog__hint {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.workspace-clone-dialog__workspace,
.workspace-clone-dialog__field,
.workspace-clone-dialog__actions {
  margin-top: 16px;
}

.workspace-clone-dialog__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workspace-clone-dialog__close {
  min-width: 44px;
  padding: 0 12px;
}

@media (min-width: 768px) {
  .ba-chat-quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .ba-chat-quick-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    align-items: stretch;
    min-height: 0;
    height: 100%;
  }

  .app-shell-workspace-grid > .app-shell-content,
  .app-shell-workspace-grid > .app-shell-context {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    max-height: 100%;
    width: auto;
    max-width: 100%;
    margin: 0;
  }

  .app-shell-workspace-grid > .app-shell-content {
    min-width: 0;
    overflow-y: auto;
  }

  .app-shell-workspace-grid > .app-shell-context {
    min-width: 0;
    width: 340px;
    overflow: hidden;
  }

  .app-shell-context-stack {
    flex: 1 1 auto;
    min-height: 0;
  }
}

@media (min-width: 1200px) {
  .app-shell-workspace-grid {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .app-shell-workspace-grid > .app-shell-context {
    width: 360px;
  }
}

@media (min-width: 1400px) {
  .ba-chat-quick-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .app-shell-nav .app-header {
    position: static;
  }

  .app-shell-nav .navbar .container {
    flex-direction: row;
    align-items: center;
    padding: 16px;
  }

  .app-shell-nav .navbar-brand {
    width: auto;
    margin-bottom: 0;
  }

  .app-shell-nav .navbar-toggler {
    margin-left: auto;
  }

  .app-shell-nav .offcanvas {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    border-right: 1px solid var(--gray-300);
    background: #fff;
    transform: translateX(-100%);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell-nav .offcanvas.show {
    transform: none;
  }

  .app-shell-nav .offcanvas-header {
    display: flex;
  }

  .app-shell-nav .offcanvas-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    overflow: visible;
  }

  .app-shell-nav .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .app-statusbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-statusbar-search {
    flex-wrap: wrap;
  }

  .app-statusbar-actions {
    justify-content: flex-end;
  }

  .app-shell-content,
  .app-shell-context {
    padding: 16px;
  }

  .app-shell-context-stack {
    gap: 12px;
  }

  .app-shell-grid,
  .app-shell-workspace-grid {
    overflow-y: auto;
    overflow-x: visible;
    -webkit-overflow-scrolling: touch;
  }

  .app-shell-nav,
  .app-shell-workspace,
  .app-shell-context {
    max-height: none;
    overflow: hidden;
  }

  .flash-container {
    right: 12px;
    left: 12px;
    bottom: calc(12px + var(--app-footer-offset, 72px));
    max-width: none;
  }

  .workspace-clone-dialog__panel {
    width: calc(100% - 24px);
    margin-top: 24px;
    padding: 20px;
  }

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