:root {
  --tblr-border-radius: 0.75rem;
  --tblr-border-radius-sm: 0.625rem;
  --tblr-border-radius-lg: 0.9rem;
  --app-surface-border: rgba(4, 32, 69, 0.08);
  --app-surface-shadow: 0 0.85rem 2rem rgba(4, 32, 69, 0.07);
  --app-card-radius: 0.95rem;
  --app-control-radius: 0.7rem;
  --app-row-radius: 0.85rem;
  --app-handle-radius: 0.7rem;
}

body {
  min-height: 100vh;
}

a {
  text-decoration: none;
}

.site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--app-surface-border);
}

.site-header .navbar {
  min-height: 4.5rem;
}

.app-navbar-actions {
  gap: 0.75rem;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: inherit;
}

.navbar-brand-image {
  width: 2rem;
  height: 2rem;
}

.brand-wordmark {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-page {
  background: var(--tblr-body-bg);
}

.auth-page .page {
  min-height: 100vh;
}

.password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--tblr-secondary);
}

.password-toggle:hover,
.password-toggle:focus {
  color: var(--tblr-secondary);
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  vertical-align: text-bottom;
}

.auth-submit .icon {
  margin-right: 0.5rem;
}

.app-card {
  border: 1px solid var(--app-surface-border);
  border-radius: var(--app-card-radius);
  box-shadow: var(--app-surface-shadow);
}

.btn,
.form-control,
.form-select,
.input-group-text,
.dropdown-menu,
.alert {
  border-radius: var(--app-control-radius);
}

.badge {
  border-radius: 0.5rem;
}

.app-page {
  background:
    radial-gradient(circle at top left, rgba(var(--tblr-primary-rgb), 0.09), transparent 24rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f8 100%);
}

.app-page .page-wrapper {
  min-height: calc(100vh - 4.5rem);
}

.app-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: var(--tblr-border-radius-pill);
}

.app-user-toggle:hover,
.app-user-toggle:focus {
  text-decoration: none;
}

.app-user-toggle .icon {
  width: 1rem;
  height: 1rem;
}

.app-user-menu {
  position: relative;
}

.app-user-menu .dropdown-menu {
  min-width: 13rem;
  top: calc(100% + 0.5rem);
  right: 0;
  bottom: auto;
  left: auto;
  margin-top: 0;
}

.app-user-menu .dropdown-item button,
.app-user-menu form .dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

.list-group-transparent .list-group-header {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--tblr-secondary);
}

.list-group-transparent .list-group-item.active {
  color: var(--tblr-primary);
  background: rgba(var(--tblr-primary-rgb), 0.08);
}

.app-card dt {
  font-weight: 600;
}

.app-card dd {
  margin-bottom: 0;
  word-break: break-word;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.share-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  padding: 0.9rem 1rem;
  color: inherit;
  background: var(--tblr-bg-surface-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  appearance: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.share-action:hover,
.share-action:focus {
  color: inherit;
  text-decoration: none;
  border-color: rgba(var(--tblr-primary-rgb), 0.24);
  box-shadow: var(--tblr-box-shadow);
  transform: translateY(-1px);
}

.share-action:focus-visible {
  outline: 2px solid rgba(var(--tblr-primary-rgb), 0.42);
  outline-offset: 2px;
}

.share-action-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.share-action-icon {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-action-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.share-action-label {
  color: var(--tblr-body-color);
  font-weight: 600;
  line-height: 1.25;
}

.share-action-note {
  color: var(--tblr-secondary);
  font-size: 0.75rem;
  line-height: 1.35;
}

.handover-text-item {
  white-space: pre-wrap;
}

.public-handover {
  display: grid;
  gap: 1.25rem;
}

.public-handover-header {
  overflow: hidden;
}

.public-handover-header .card-body {
  padding: clamp(1.25rem, 2vw, 1.75rem);
}

.public-handover-title {
  letter-spacing: -0.02em;
}

.public-handover-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--tblr-secondary);
}

.public-handover-meta span {
  position: relative;
}

.public-handover-status-badge {
  align-self: flex-start;
  white-space: nowrap;
}

.public-handover-banner {
  margin-bottom: 0;
}

.public-handover-shell {
  align-items: start;
}

.public-handover-section {
  overflow: hidden;
}

.public-handover-items {
  display: grid;
}

.public-handover-item {
  display: grid;
  gap: 0.625rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--tblr-border-color);
}

.public-handover-item:first-child {
  border-top: 0;
}

.public-handover-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.public-handover-item-type {
  flex: 0 0 auto;
}

.public-handover-item-body {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.public-handover-item-content {
  min-width: 0;
}

.public-handover-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  color: var(--tblr-primary);
  background: rgba(var(--tblr-primary-rgb), 0.1);
  border-radius: 999px;
}

.public-handover-item-icon svg {
  width: 1rem;
  height: 1rem;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-handover-item-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.public-handover-file .public-handover-item-value {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.public-handover-file-link {
  font-weight: 600;
}

.public-handover-file-size {
  color: var(--tblr-secondary);
  font-size: 0.8125rem;
}

.public-handover-date .public-handover-item-value {
  font-variant-numeric: tabular-nums;
}

.public-handover-confirmation {
  overflow: hidden;
}

.public-handover-summary {
  position: sticky;
  top: 1rem;
}

.public-handover-summary-title {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.35;
}

.public-handover-summary-list {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: max-content minmax(0, 1fr);
}

.public-handover-summary-list dt {
  color: var(--tblr-secondary);
  font-weight: 600;
}

.public-handover-summary-list dd {
  margin: 0;
}

.dashboard-panel-body {
  min-height: 8rem;
}

.dashboard-overview-accordion .accordion-button::after {
  display: none;
}

.dashboard-overview-accordion .accordion-button {
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--tblr-body-color);
  background: var(--tblr-bg-surface);
  box-shadow: none;
}

.dashboard-overview-accordion .accordion-button:not(.collapsed) {
  color: var(--tblr-body-color);
  background: rgba(var(--tblr-primary-rgb), 0.04);
  box-shadow: inset 0 -1px 0 var(--app-surface-border);
}

.dashboard-overview-accordion .accordion-button:focus {
  box-shadow: inset 0 0 0 0.125rem rgba(var(--tblr-primary-rgb), 0.18);
}

.dashboard-accordion-header {
  background: var(--tblr-bg-surface);
}

.dashboard-accordion-header-with-action {
  display: flex;
  align-items: stretch;
}

.dashboard-accordion-button {
  min-width: 0;
}

.dashboard-accordion-header-with-action .dashboard-accordion-button {
  flex: 1 1 auto;
}

.dashboard-accordion-title {
  min-width: 0;
}

.dashboard-accordion-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--tblr-secondary);
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--app-control-radius);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.dashboard-accordion-icon .icon {
  width: 1rem;
  height: 1rem;
}

.dashboard-overview-accordion .accordion-button[aria-expanded="true"] .dashboard-accordion-icon {
  color: var(--tblr-primary);
  background: rgba(var(--tblr-primary-rgb), 0.08);
  border-color: rgba(var(--tblr-primary-rgb), 0.24);
  transform: rotate(180deg);
}

.dashboard-accordion-action {
  align-self: center;
  flex-shrink: 0;
  margin-right: 1rem;
  margin-left: 1rem;
  white-space: nowrap;
}

.dashboard-action-stack,
.dashboard-accordion-action-stack {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 0.25rem;
}

.dashboard-accordion-action-stack {
  align-self: center;
  margin-right: 1rem;
  margin-left: 1rem;
}

.dashboard-accordion-action-stack .dashboard-accordion-action {
  margin: 0;
}

.dashboard-limit-tooltip-trigger {
  display: inline-flex;
}

.dashboard-limit-tooltip-trigger:focus-visible {
  outline: 0.125rem solid rgba(var(--tblr-primary-rgb), 0.35);
  outline-offset: 0.125rem;
}

.tooltip.dashboard-limit-tooltip {
  --tblr-tooltip-max-width: min(28rem, calc(100vw - 2rem));
}

.tooltip.dashboard-limit-tooltip .tooltip-inner {
  width: min(28rem, calc(100vw - 2rem));
  max-width: min(28rem, calc(100vw - 2rem));
  padding: 0.55rem 0.75rem;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.dashboard-panel-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 8rem;
}

.dashboard-panel-loading .spinner-border {
  flex-shrink: 0;
}

.dashboard-project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--tblr-primary);
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.dashboard-project-link:hover,
.dashboard-project-link:focus {
  color: var(--tblr-primary);
  text-decoration: underline;
  text-decoration-color: rgba(var(--tblr-primary-rgb), 0.45);
}

.dashboard-project-link-icon {
  width: 0.9rem;
  height: 0.9rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.project-inline-form .card-body {
  padding: 1rem 1.25rem;
}

.project-inline-form .form-label {
  margin-bottom: 0.35rem;
}

@media (max-width: 767.98px) {
  .share-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-handover-summary {
    position: static;
  }
}

@media (max-width: 575.98px) {
  .share-actions {
    grid-template-columns: 1fr;
  }

  .public-handover-item {
    padding-inline: 1rem;
  }
}

.min-w-0 {
  min-width: 0;
}

.project-section-list {
  min-height: 3rem;
}

.project-section-card {
  --project-row-inset: 0.85rem;
  --project-row-gap: 0.75rem;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 0.65rem;
  padding: var(--project-row-inset);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.project-section-card.is-dragging {
  opacity: 0.8;
  border-color: rgba(var(--tblr-primary-rgb), 0.45);
  box-shadow: 0 1rem 2rem rgba(var(--tblr-primary-rgb), 0.12);
}

.project-section-card.drop-target {
  border-color: rgba(var(--tblr-primary-rgb), 0.55);
  background: rgba(var(--tblr-primary-rgb), 0.05);
}

.project-section-header {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2rem;
  column-gap: var(--project-row-gap);
  align-items: start;
  min-width: 0;
}

.project-layout-handle-cell,
.project-layout-action-cell {
  display: flex;
  min-width: 0;
}

.project-layout-action-cell {
  justify-content: flex-end;
}

.project-layout-action-cell form {
  margin: 0;
}

.project-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
}

.project-section-toggle:focus-visible {
  outline: 2px solid rgba(var(--tblr-primary-rgb), 0.22);
  outline-offset: 3px;
  border-radius: var(--app-control-radius);
}

.project-section-toggle-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.project-section-toggle-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.project-section-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--tblr-secondary);
  transition: transform 0.15s ease, color 0.15s ease;
}

.project-section-toggle:hover .project-section-chevron,
.project-section-toggle:focus-visible .project-section-chevron {
  color: var(--tblr-primary);
}

.project-section-toggle[aria-expanded="false"] .project-section-chevron {
  transform: rotate(-90deg);
}

.project-section-body[hidden] {
  display: none !important;
}

.project-item-row {
  background: rgba(248, 250, 252, 0.88);
  border-radius: 0.6rem;
  margin-inline: calc(var(--project-row-inset) * -1);
  padding: var(--project-row-inset);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.project-item-row.is-dragging {
  opacity: 0.8;
  border-color: rgba(var(--tblr-primary-rgb), 0.45);
  box-shadow: 0 1rem 2rem rgba(var(--tblr-primary-rgb), 0.12);
}

.project-item-row.drop-target {
  border-color: rgba(var(--tblr-primary-rgb), 0.55);
  background: rgba(var(--tblr-primary-rgb), 0.05);
}

.project-item-main {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 2rem;
  column-gap: var(--project-row-gap);
  align-items: start;
  min-width: 0;
}

.project-section-handle,
.project-item-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(4, 32, 69, 0.08);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--tblr-secondary);
  cursor: grab;
  flex-shrink: 0;
}

.project-section-handle:active,
.project-item-handle:active {
  cursor: grabbing;
}

.project-section-handle .icon,
.project-item-handle .icon {
  width: 1rem;
  height: 1rem;
}

.project-item-editor {
  margin-top: 0;
}

.project-item-editor .form-control {
  border-radius: var(--app-control-radius);
}

.project-item-editor .form-label {
  margin-bottom: 0.35rem;
  color: var(--tblr-secondary);
}

.project-item-editor textarea.form-control {
  min-height: 7rem;
  resize: vertical;
}

.project-item-save-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.65rem;
}

.project-item-save-status {
  flex: 1;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  color: var(--tblr-secondary);
}

.project-item-save-status[data-state="saving"] {
  color: var(--tblr-secondary);
}

.project-item-save-status[data-state="saved"] {
  color: var(--tblr-success);
}

.project-item-save-status[data-state="error"] {
  color: var(--tblr-danger);
}

.project-item-save-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 7.5rem;
  justify-content: center;
}

.project-item-save-button[data-state="saved"] {
  background: rgba(var(--tblr-success-rgb), 0.12);
  border-color: rgba(var(--tblr-success-rgb), 0.24);
  color: var(--tblr-success);
}

.project-item-save-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
}

.project-item-save-button[data-state="saving"] .project-item-save-button-icon {
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: project-save-spin 0.7s linear infinite;
}

.project-item-save-button[data-state="saved"] .project-item-save-button-icon {
  font-size: 0.9rem;
  font-weight: 700;
}

.project-file-item {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.project-file-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(14rem, 0.9fr);
  gap: 0.85rem;
  align-items: start;
}

.project-file-media {
  min-width: 0;
}

.project-file-dropzone {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1rem;
  border: 1px dashed rgba(var(--tblr-primary-rgb), 0.38);
  border-radius: 0.6rem;
  background: rgba(var(--tblr-primary-rgb), 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.project-file-dropzone:hover,
.project-file-dropzone:focus,
.project-file-dropzone.is-dragover {
  border-color: rgba(var(--tblr-primary-rgb), 0.72);
  background: rgba(var(--tblr-primary-rgb), 0.08);
}

.project-file-dropzone:focus {
  outline: none;
}

.project-file-dropzone-icon,
.project-file-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  background: #fff;
  color: var(--tblr-primary);
  border: 1px solid rgba(var(--tblr-primary-rgb), 0.14);
}

.project-file-dropzone-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
  line-height: 1.35;
}

.project-file-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem;
  border: 1px solid rgba(4, 32, 69, 0.08);
  border-radius: 0.6rem;
  background: #fff;
}

.project-file-card-body {
  flex: 1;
  min-width: 0;
}

.project-file-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-file-feedback {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--tblr-danger);
}

.project-file-feedback:empty {
  display: none;
}

.project-file-short-note-form {
  min-width: 0;
}

.project-file-short-note-form textarea.form-control {
  min-height: 4.3rem;
  resize: vertical;
}

.project-file-short-note-footer {
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.project-file-short-note-footer .project-item-save-status {
  flex: 1;
  text-align: right;
}

.project-file-short-note-counter {
  white-space: nowrap;
}

.project-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 0.5rem;
  color: var(--tblr-secondary);
  border-color: rgba(4, 32, 69, 0.08);
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.project-icon-button:hover,
.project-icon-button:focus {
  color: var(--tblr-danger);
  border-color: rgba(var(--tblr-danger-rgb), 0.28);
  background: rgba(var(--tblr-danger-rgb), 0.07);
}

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

@media (max-width: 767.98px) {
  .app-navbar-actions {
    gap: 0.5rem;
  }

  .app-card .card-body {
    padding: 1.25rem;
  }

  .dashboard-accordion-header-with-action {
    flex-wrap: wrap;
  }

  .dashboard-accordion-header-with-action .dashboard-accordion-button {
    flex-basis: 100%;
  }

  .dashboard-accordion-action {
    margin: 0 1.25rem 1rem auto;
  }

  .dashboard-accordion-action-stack {
    align-items: flex-start;
    width: 100%;
    margin: 0 1.25rem 1rem;
  }

  .dashboard-accordion-action-stack .dashboard-accordion-action {
    margin: 0;
  }

  .dashboard-action-stack {
    align-items: flex-start;
  }

  .project-item-save-row {
    flex-direction: column;
    align-items: stretch;
  }

  .project-item-save-button {
    width: 100%;
  }

  .project-file-item-grid {
    grid-template-columns: 1fr;
  }

  .project-file-short-note-footer .project-item-save-status {
    text-align: left;
  }

  .project-file-dropzone,
  .project-file-card {
    align-items: stretch;
    flex-direction: column;
  }

  .project-file-actions,
  .project-file-actions .btn,
  .project-file-replace-form,
  .project-file-replace-form label {
    width: 100%;
  }
}
