:root {
  --bg: #eef2f8;
  --bg-soft: #f8faff;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --text: #1b2435;
  --muted: #62708a;
  --primary: #0f766e;
  --primary-strong: #0b4f64;
  --primary-soft: #d8f3ef;
  --danger: #b4233f;
  --border: #d5deec;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-1: 0 10px 34px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, #d7ebe8 0%, transparent 38%),
    radial-gradient(circle at 100% 0%, #deecff 0%, transparent 36%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 72%);
  line-height: 1.45;
}

body.is-auth {
  padding-bottom: 5.7rem;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a,
button,
.btn,
.icon-link,
.bottom-nav-link,
.contracts-list-item {
  -webkit-tap-highlight-color: transparent;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, 100% - 1.5rem);
  margin-inline: auto;
}

.app-shell {
  padding-block: 1.2rem 1.6rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(213, 222, 236, 0.9);
  background: rgba(248, 251, 255, 0.87);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  width: min(1080px, 100% - 1.5rem);
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  box-shadow: none;
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.brand-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.icon-link {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4f5f7b;
  background: var(--surface);
  transition: background-color 0.2s ease, transform 0.13s ease, filter 0.13s ease;
}

.icon-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-link .icon-link-image {
  width: 18px;
  height: 18px;
  display: block;
  object-fit: contain;
}

.icon-link:hover {
  text-decoration: none;
  background: #edf3fb;
}

.icon-link:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.98);
}

.topbar-actions .inline-form {
  display: inline-flex;
}

.topbar-actions .icon-link,
.topbar-actions .btn-with-icon {
  min-height: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-actions .btn-with-icon {
  width: auto;
  padding: 0 0.72rem;
  margin-top: 0;
  align-self: center;
}

.topbar-actions .btn,
.topbar-actions .icon-link {
  margin-top: 0;
  align-self: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  max-width: 32ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.79rem;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  padding: 0.42rem 0.7rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  padding: 1.1rem;
  box-shadow: var(--shadow-1);
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.2rem, 2.8vw, 1.6rem);
}

h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1rem, 2vw, 1.22rem);
}

p {
  margin-block: 0.45rem 0;
}

small,
.muted {
  color: var(--muted);
}

label {
  display: block;
  margin-bottom: 0.68rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2b3852;
}

.reminder-editor {
  display: grid;
  gap: 0.5rem;
}

.reminder-editor-items {
  display: grid;
  gap: 0.5rem;
}

.reminder-editor-row {
  display: grid;
  gap: 0.45rem;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.reminder-editor-row input {
  margin-top: 0;
}

.reminder-editor-add,
.reminder-editor-remove {
  width: auto;
  min-height: 36px;
  margin-top: 0;
  padding-inline: 0.65rem;
}

.collapsible-block {
  margin: 1rem 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.collapsible-block summary {
  cursor: pointer;
  list-style: none;
  padding: 0.72rem 0.8rem;
  font-weight: 700;
  color: #2b3852;
}

.collapsible-block summary::-webkit-details-marker {
  display: none;
}

.collapsible-block summary::after {
  content: "+";
  float: right;
  color: var(--muted);
}

.collapsible-block[open] summary::after {
  content: "-";
}

.collapsible-content {
  padding: 0 0.8rem 0.8rem;
}

.is-nested {
  margin-bottom: 0;
  background: #fff;
}

input,
select,
textarea,
button {
  width: 100%;
  margin-top: 0.34rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font: inherit;
  background: #fff;
  color: var(--text);
  min-height: 44px;
}

input,
select,
textarea {
  padding: 0.64rem 0.72rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 104px;
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix input {
  padding-right: 2rem;
}

.input-suffix {
  position: absolute;
  right: 0.72rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 700;
  pointer-events: none;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 0.34rem;
}

.password-input-wrap input {
  margin-top: 0;
  padding-right: 6.8rem;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: 26px;
  margin-top: 0;
  padding: 0 0.5rem;
  border-radius: 8px;
  border: 1px solid #c4d7ff;
  background: #eef4ff;
  color: #1f4f9b;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.password-toggle-btn:hover {
  background: #e4eeff;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: #48a79a;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #eef1f5;
  border-color: #cfd7e4;
  color: #5d6a80;
  cursor: not-allowed;
}

input:disabled::placeholder,
textarea:disabled::placeholder {
  color: #8a96aa;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  background: linear-gradient(155deg, var(--primary-strong) 0%, var(--primary) 100%);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.66rem 0.95rem;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.98);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-with-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-danger {
  background: linear-gradient(155deg, #8a112c 0%, var(--danger) 100%);
}

.inline-form {
  margin: 0;
}

.grid-2 {
  display: grid;
  gap: 0.8rem;
}

.contract-filter-bar {
  margin-bottom: 1rem;
}

.contract-overdue-bar {
  margin-bottom: 0.75rem;
}

.contract-overdue-banner {
  margin-top: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid #f2b26c;
  border-radius: 12px;
  background: #fff8ef;
  color: #7c3f00;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.contract-overdue-banner span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  height: 1.65rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #f8d7b0;
  color: #6f3400;
  font-size: 0.84rem;
}

.contracts-overdue-modal {
  position: fixed;
  inset: 0;
  z-index: 2550;
  display: grid;
  place-items: center;
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.5);
}

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

.contracts-overdue-dialog {
  width: min(760px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
  padding: 1rem;
}

.contracts-overdue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.contracts-overdue-top h2 {
  margin: 0;
}

.contracts-overdue-close {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  margin-top: 0;
  padding: 0;
  border-radius: 999px;
  font-weight: 800;
}

.contracts-overdue-summary {
  margin: 0.5rem 0 0;
  color: #38546f;
  font-weight: 600;
}

.contracts-overdue-status {
  margin: 0.6rem 0 0;
  padding: 0.52rem 0.62rem;
  border-radius: 10px;
  border: 1px solid #8ed9c6;
  background: #effcf8;
  color: #0f554d;
  font-weight: 700;
}

.contracts-overdue-status.is-error {
  border-color: #f2b2be;
  background: #fff2f4;
  color: #7f1630;
}

.contracts-overdue-empty {
  margin-top: 0.8rem;
  color: var(--muted);
}

.contracts-overdue-list {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.62rem;
}

.contracts-overdue-item {
  border: 1px solid #d7e2f0;
  border-radius: 12px;
  padding: 0.75rem;
  background: #f9fbff;
}

.contracts-overdue-item.is-busy {
  opacity: 0.75;
}

.contracts-overdue-item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
}

.contracts-overdue-item-title {
  display: grid;
  gap: 0.12rem;
}

.contracts-overdue-item-title strong {
  font-size: 0.95rem;
}

.contracts-overdue-item-title small {
  color: var(--muted);
  font-size: 0.81rem;
}

.contracts-overdue-item-date {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #f2b26c;
  background: #fff4e7;
  color: #7c3f00;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
}

.contracts-overdue-readonly {
  margin: 0.7rem 0 0;
  color: #5f6d82;
  font-size: 0.84rem;
  font-weight: 600;
}

.contracts-overdue-actions {
  margin-top: 0.62rem;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.5rem;
}

.contracts-overdue-date-wrap,
.contracts-overdue-status-wrap {
  margin-bottom: 0;
  display: grid;
  gap: 0.3rem;
  min-width: 170px;
  flex: 1 1 220px;
  font-size: 0.79rem;
}

.contracts-overdue-date-wrap input,
.contracts-overdue-status-wrap select {
  margin-top: 0;
  min-height: 38px;
  padding-block: 0.42rem;
}

.contracts-overdue-btn {
  width: auto;
  min-height: 38px;
  margin-top: 0;
  padding-inline: 0.8rem;
}

body.contracts-overdue-open {
  overflow: hidden;
}

.contracts-table-launch {
  margin-bottom: 1rem;
  display: none;
  text-align: center;
}

.contracts-open-table-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  margin-top: 0;
  padding-inline: 0.9rem;
}

.contracts-table-mobile-hint {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.contracts-table-card {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contracts-table-return {
  margin: 0 0 0.75rem;
}

.contracts-table-top-actions {
  display: grid;
  grid-template-columns: minmax(40px, auto) auto minmax(40px, auto);
  align-items: center;
  gap: 0.5rem;
}

.contracts-table-top-actions .contracts-table-add-btn {
  justify-self: start;
}

.contracts-table-top-actions .contracts-open-table-btn {
  justify-self: center;
}

.contracts-table-add-btn {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contracts-table-expand-btn {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  padding: 0;
  border-radius: 999px;
  justify-self: end;
}

.contracts-table-add-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contracts-table-expand-btn svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contracts-table-top-spacer {
  width: 40px;
  min-height: 40px;
}

.contracts-table-head h2 {
  margin-bottom: 0.25rem;
}

.contracts-table-head p {
  margin-top: 0;
}

.contracts-table-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
}

.contracts-table-actions .btn {
  width: auto;
  margin-top: 0;
  padding-inline: 0.9rem;
}

.contracts-table-wrap {
  margin-top: 0.65rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.contracts-table-card .wtHolder {
  min-height: 0;
}

.contracts-table-grid {
  min-width: 920px;
}

.contracts-table-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: rgba(15, 23, 42, 0.46);
  padding: 0.65rem;
}

.contracts-table-modal[hidden] {
  display: none;
}

.contracts-table-modal-dialog {
  width: 100%;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.contracts-table-modal-top {
  display: flex;
  justify-content: flex-end;
  padding: 0.45rem;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.contracts-table-modal-close-btn {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  height: 40px;
  margin-top: 0;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.contracts-table-modal-close-btn span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.contracts-table-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  padding: 0.35rem;
}

.contracts-table-modal .contracts-table-wrap {
  margin-top: 0;
  width: 100%;
}

/* Keep the contract spreadsheet in light mode regardless of OS theme. */
.contracts-table-card,
.contracts-table-modal,
.contracts-table-card .handsontable,
.contracts-table-modal .handsontable,
.contracts-table-card .handsontable .wtHolder,
.contracts-table-modal .handsontable .wtHolder,
.contracts-table-card .handsontable .wtHider,
.contracts-table-modal .handsontable .wtHider {
  color-scheme: light;
}

.contracts-table-card .handsontable,
.contracts-table-modal .handsontable,
.contracts-table-card .handsontable .wtHolder,
.contracts-table-modal .handsontable .wtHolder,
.contracts-table-card .handsontable .wtHider,
.contracts-table-modal .handsontable .wtHider,
.contracts-table-card .handsontable .wtSpreader,
.contracts-table-modal .handsontable .wtSpreader,
.contracts-table-card .handsontable table,
.contracts-table-modal .handsontable table,
.contracts-table-card .handsontable td,
.contracts-table-modal .handsontable td,
.contracts-table-card .handsontable th,
.contracts-table-modal .handsontable th {
  background: #ffffff !important;
  color: #1b2435 !important;
}

.contracts-table-card .handsontable th,
.contracts-table-modal .handsontable th {
  background: #f4f7fc !important;
}

.contracts-table-card .handsontable .colHeader .contracts-sort-indicator,
.contracts-table-modal .handsontable .colHeader .contracts-sort-indicator {
  margin-left: 0.35rem;
  font-size: 0.75em;
  line-height: 1;
  opacity: 0.9;
}

.contracts-table-card textarea.handsontableInput,
.contracts-table-modal textarea.handsontableInput {
  background: #ffffff !important;
  color: #1b2435 !important;
}

body.contracts-table-no-page-scroll {
  overflow: hidden;
}

.contracts-table-grid .contracts-table-cell-saved {
  background: #d6f5dc !important;
}

.contracts-table-grid .contracts-table-cell-required-empty {
  background: #ffe4e4 !important;
  box-shadow: inset 0 0 0 1px #d35f5f;
}

.contracts-table-card .handsontable td.contracts-table-cell-readonly,
.contracts-table-modal .handsontable td.contracts-table-cell-readonly {
  background: #eef2f7 !important;
  color: #7a8599 !important;
}

.contracts-table-grid .contracts-table-cell-saved {
  background: #d6f5dc !important;
  box-shadow: inset 0 0 0 1px #6abf78;
}

.contract-filter-form {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.contract-filter-form>input[type="search"] {
  flex: 1 1 auto;
  margin-top: 0;
  min-height: 40px;
  padding-block: 0.5rem;
}

.contract-filter-menu,
.contract-sort-menu {
  position: relative;
}

.contract-filter-menu summary,
.contract-sort-menu summary {
  list-style: none;
}

.contract-filter-menu summary::-webkit-details-marker,
.contract-sort-menu summary::-webkit-details-marker {
  display: none;
}

.contract-filter-button,
.contract-sort-button {
  width: 40px;
  min-width: 40px;
  height: 40px;
  margin-top: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: #4f5f7b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.13s ease, filter 0.13s ease;
}

.contract-filter-button:hover,
.contract-sort-button:hover {
  background: #edf3fb;
}

.contract-filter-button:active,
.contract-sort-button:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.98);
}

.contract-filter-button svg,
.contract-sort-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contract-filter-options,
.contract-sort-options {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 170px;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  display: grid;
  gap: 0.25rem;
  z-index: 15;
}

.contract-filter-options button,
.contract-sort-options button {
  margin-top: 0;
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.4rem 0.5rem;
  font-weight: 600;
  cursor: pointer;
}

.contract-filter-options button:hover,
.contract-sort-options button:hover {
  background: #edf3fb;
}

.contract-filter-options button.is-active,
.contract-sort-options button.is-active {
  background: #e6f3f1;
  color: var(--primary-strong);
}

.compact {
  gap: 0.45rem;
}

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.stat-card {
  background: linear-gradient(175deg, #f7fffd 0%, #edf8ff 100%);
  border: 1px solid #cfe5ec;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
}

.stat-card small {
  display: block;
  margin-bottom: 0.2rem;
}

.stat-card strong {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 600;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
  margin-top: 0;
}

.permission-groups {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.permission-group {
  margin: 0;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f9fbff;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.permission-group legend {
  padding: 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  color: #4f5f7b;
  grid-column: 1 / -1;
}

.permission-card {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d6e0ee;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.permission-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.permission-card-main {
  min-width: 0;
  display: grid;
  gap: 0;
}

.permission-card-title {
  font-size: 0.87rem;
  font-weight: 800;
  color: #21304b;
}

.permission-card-desc {
  font-size: 0.74rem;
  color: var(--muted);
}

.permission-switch {
  width: 2rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #d0d9e6;
  position: relative;
  flex-shrink: 0;
  margin-top: 0.12rem;
  transition: background-color 0.18s ease;
}

.permission-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
  transition: transform 0.18s ease;
}

.permission-card.is-active {
  border-color: #8acdc4;
  background: #eefbf7;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.08);
}

.permission-card.is-active .permission-switch {
  background: #32aa9a;
}

.permission-card.is-active .permission-switch::after {
  transform: translateX(0.85rem);
}

.permission-card.is-locked .permission-card-desc::after {
  content: " (durch Bearbeiten aktiv)";
  color: #4f5f7b;
}

.permission-groups+.btn {
  margin-top: 0.7rem;
}

input[type="file"]+.btn {
  margin-top: 0.7rem;
}

.document-upload-native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.document-upload-controls {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.45rem;
}

.document-upload-controls .btn {
  margin-top: 0;
}

.document-upload-count {
  display: block;
  margin-top: 0.45rem;
}

.document-upload-preview {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.document-upload-item {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 12px;
  padding: 0.55rem;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
}

.document-upload-order {
  position: absolute;
  top: 0.42rem;
  left: 0.42rem;
  min-width: 1.7rem;
  min-height: 1.3rem;
  padding: 0 0.36rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.document-upload-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #d7deeb;
  background: #fff;
}

.document-upload-type {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 1px solid #d7deeb;
  background: #ffffff;
  color: #40506a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
}

.document-upload-meta {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.document-upload-meta strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.84rem;
}

.document-upload-remove {
  width: auto;
  min-height: 34px;
  padding-inline: 0.6rem;
  justify-self: start;
}

.document-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.document-upload-move,
.document-upload-remove {
  width: auto;
  min-height: 34px;
  margin-top: 0;
  padding-inline: 0.55rem;
}

.stacked-form+.list {
  margin-top: 0.8rem;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.62rem;
}

.list li {
  background: var(--surface-soft);
  border: 1px solid #dce5f2;
  border-radius: 12px;
  padding: 0.72rem 0.8rem;
  display: grid;
  gap: 0.2rem;
}

.list li form {
  margin-top: 0.45rem;
}

.list li a strong {
  color: var(--text);
}

.reminder-groups {
  display: grid;
  gap: 1rem;
}

.reminder-group h2 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.reminder-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reminder-row {
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0;
}

.reminder-row-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
  padding: 0.46rem 0;
  width: 100%;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.13s ease, filter 0.13s ease;
}

.reminder-row-link:active {
  transform: translateY(1px) scale(0.992);
  filter: brightness(0.98);
}

.reminder-row-link:hover,
.reminder-row-link:visited,
.reminder-row-link:active {
  color: var(--text);
  text-decoration: none;
}

.reminder-edit-btn {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  height: 30px;
  margin-top: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #4f5f7b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.13s ease, filter 0.13s ease;
}

.reminder-edit-btn:hover {
  background: #edf3fb;
}

.reminder-edit-btn:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.98);
}

.reminder-title-wrap {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.reminder-reason {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 600;
}

.reminder-edit-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reminder-date {
  color: var(--muted);
  white-space: nowrap;
  font-size: 0.84rem;
}

.reminder-group-overdue h2 {
  color: #9f1239;
}

.reminder-row-overdue {
  border-bottom-color: #efb6c5;
}

.reminder-row-link-overdue,
.reminder-row-link-overdue:hover,
.reminder-row-link-overdue:visited,
.reminder-row-link-overdue:active {
  color: #9f1239;
}

.reminder-date-overdue {
  color: #9f1239;
  font-weight: 700;
}

.reminder-status-info {
  margin-top: 0;
  margin-bottom: 0.18rem;
  width: max-content;
  grid-column: 1 / -1;
}

.reminder-popup {
  width: min(340px, calc(100vw - 1.8rem));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.9rem;
  box-shadow: var(--shadow-1);
}

.reminder-popup::backdrop {
  background: rgba(15, 23, 42, 0.38);
}

.reminder-popup-form {
  display: grid;
  gap: 0.65rem;
}

.reminder-popup-label {
  margin-bottom: 0;
  font-size: 0.82rem;
}

.reminder-popup-label input[type="date"] {
  margin-top: 0.4rem;
}

.reminder-popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.reminder-popup-actions.single-action {
  grid-template-columns: 1fr;
}

.reminder-popup-actions .btn {
  margin-top: 0;
}

.reminder-popup-actions [data-reminder-popup-delete] {
  border-color: #f2b2be;
  background: #fff2f4;
  color: #7f1630;
}

.reminder-popup-actions [data-reminder-popup-delete]:hover {
  background: #ffe8ec;
}

.reminder-popup-cancel {
  margin-top: 0;
}

.doc-file-link {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.contracts-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  transition: transform 0.13s ease, filter 0.13s ease;
}

.contracts-card {
  position: relative;
}

.contracts-menu-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  cursor: default;
}

.contracts-list-item:active {
  transform: translateY(1px) scale(0.992);
  filter: brightness(0.98);
}

.contract-main {
  min-width: 0;
  display: grid;
  gap: 0.2rem;
}

.contract-main strong {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.contract-signals {
  display: grid;
  gap: 0.28rem;
  justify-items: end;
  width: fit-content;
  min-width: 0;
  margin-left: auto;
}

.contract-signal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  line-height: 1.2;
  white-space: nowrap;
  width: 6.4rem;
  height: 1.45rem;
  overflow: hidden;
}

.contract-signal>span {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.contract-signal>span:first-child {
  width: 0.85rem;
  text-align: center;
  flex: 0 0 0.85rem;
}

.contract-signal-reminder {
  background: #e8f8ee;
  border: 1px solid #a7dbbb;
  color: #176437;
}

.contract-signal-owner {
  background: #e7f1ff;
  border: 1px solid #9bc2ff;
  color: #174a9b;
}

.contract-signal-share {
  width: max-content;
  max-width: none;
  justify-content: flex-start;
  justify-self: start;
  align-self: start;
}

.contract-signal-share>span:first-child {
  width: auto;
  flex: 0 1 auto;
}

.contract-signal-status-info {
  background: #fff7d6;
  border: 1px solid #e6d37f;
  color: #6e5600;
}

.contract-signal-status-info>span:first-child {
  width: auto;
  flex: 0 1 auto;
}

.contract-signal-follow-up {
  background: #edf1f7;
  border: 1px solid #c6d0e1;
  color: #334155;
}

.contract-signal-follow-up>span:first-child {
  width: auto;
  flex: 0 1 auto;
}

.contract-signal-share-arrow {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  opacity: 0.9;
}

.contract-signal-notice {
  background: #ffecee;
  border: 1px solid #efb7be;
  color: #8b2435;
}

.contract-readonly-info {
  margin-top: 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.6rem 0.7rem;
  display: grid;
  gap: 0.25rem;
}

.contract-readonly-info strong {
  font-size: 0.8rem;
  color: #334155;
}

.contract-readonly-info span {
  font-size: 0.84rem;
  color: #475569;
}

.alert {
  border-radius: 12px;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.84rem;
  font-weight: 600;
}

.form-status {
  margin-bottom: 0.8rem;
}

.alert.success {
  border: 1px solid #8ed9c6;
  background: #effcf8;
  color: #0f554d;
}

.alert.error {
  border: 1px solid #f2b2be;
  background: #fff2f4;
  color: #7f1630;
}

.input-error {
  border-color: #e0556f !important;
  background: #fff7f9 !important;
}

.field-error {
  display: block;
  margin-top: 0.35rem;
  color: #8f1733;
  font-size: 0.78rem;
  font-weight: 600;
}

.form-inline-error {
  color: #8f1733;
}

.flash-stack {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2400;
  display: grid;
  gap: 0.45rem;
  width: min(360px, calc(100vw - 1.7rem));
}

.flash-toast {
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 0.62rem 0.72rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 0.86rem;
  font-weight: 700;
  background: #fff;
}

.flash-toast.success {
  border-color: #8ed9c6;
  background: #effcf8;
  color: #0f554d;
}

.flash-toast.error {
  border-color: #f2b2be;
  background: #fff2f4;
  color: #7f1630;
}

body.confirm-open {
  overflow: hidden;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.confirm-overlay[hidden] {
  display: none;
}

.confirm-dialog {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.24);
  padding: 1rem;
}

.confirm-title {
  margin: 0;
  font-size: 1.02rem;
}

.confirm-message {
  margin: 0.55rem 0 0;
  color: #2f4f67;
}

.confirm-actions {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.confirm-actions .btn {
  width: auto;
  min-width: 120px;
  margin-top: 0;
}

.onboarding-card {
  border: 1px solid #bfd5e4;
  background: linear-gradient(165deg, #ffffff 0%, #e8f7f5 100%);
}

.onboarding-intro {
  margin-top: 0;
  color: #2f4f67;
}

.onboarding-kicker {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.74rem;
  font-weight: 800;
  color: #1f5f69;
}

.onboarding-steps {
  margin: 0.85rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.42rem;
}

.onboarding-progress-list {
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.onboarding-progress-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #cddbec;
  background: rgba(255, 255, 255, 0.82);
  color: #32536f;
  font-weight: 700;
  font-size: 0.86rem;
}

.onboarding-progress-list li span {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  border: 1px solid #b8cce5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  background: #f4f9ff;
  color: #2f5a7e;
}

.onboarding-progress-list li.is-active {
  border-color: #8acdc4;
  background: #eefbf7;
}

.onboarding-progress-list li.is-active span {
  border-color: #5ab8a8;
  background: #dff7f2;
  color: #145f5e;
}

.onboarding-progress-list li.is-complete {
  border-color: #95d7b9;
  background: #edf9f1;
}

.onboarding-progress-list li.is-complete span {
  border-color: #72be93;
  background: #daf2e3;
  color: #1f6a48;
}

.onboarding-actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.btn.btn-soft {
  border-color: #bfd1e4;
  background: rgba(255, 255, 255, 0.8);
  color: #234868;
}

.auth-card {
  max-width: 480px;
  margin: 2rem auto;
  padding: 1.35rem;
}

.auth-card h1 {
  margin-bottom: 0.35rem;
}

.auth-card p {
  margin-top: 0.95rem;
}

#password-output {
  margin-top: 0.6rem;
  padding: 0.6rem 0.7rem;
  border: 1px dashed #b6c7df;
  border-radius: 10px;
  background: #f5f8fc;
  min-height: 44px;
}

.bottom-nav {
  position: fixed;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  border-radius: 1.1rem;
  border: 1px solid #cfd9e9;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  padding: 0.3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  z-index: 1200;
}

.bottom-nav-link {
  min-height: 46px;
  padding: 0.45rem 0.3rem;
  border-radius: 0.8rem;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.13s ease, filter 0.13s ease;
}

.bottom-nav-link:active {
  transform: translateY(1px) scale(0.98);
  filter: brightness(0.98);
}

.bottom-nav-icon {
  display: inline-flex;
  width: 1.1rem;
  height: 1.1rem;
  color: currentColor;
}

.bottom-nav-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-label {
  line-height: 1;
}

.bottom-nav-link:hover {
  text-decoration: none;
  background: #edf3fb;
}

.bottom-nav-link.active {
  color: var(--primary-strong);
  background: #e6f3f1;
}

.bottom-nav-link-create {
  color: #f4fffd;
  background: linear-gradient(160deg, var(--primary-strong) 0%, var(--primary) 100%);
}

.bottom-nav-link-create:hover,
.bottom-nav-link-create:focus-visible {
  color: #fff;
  background: linear-gradient(160deg, var(--primary-strong) 0%, var(--primary) 100%);
}

.bottom-nav-link-create.active {
  background: linear-gradient(160deg, var(--primary-strong) 12%, #0c9f93 100%);
  color: #fff;
}

.bottom-nav-link-create.active:hover,
.bottom-nav-link-create.active:focus-visible {
  background: linear-gradient(160deg, var(--primary-strong) 12%, #0c9f93 100%);
  color: #fff;
}

.landing-page {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 12% 16%, #c9ece7 0%, rgba(201, 236, 231, 0) 32%),
    radial-gradient(circle at 86% 0%, #d8e7ff 0%, rgba(216, 231, 255, 0) 36%),
    linear-gradient(180deg, #f8fbff 0%, #eef3fa 65%, #e8eef9 100%);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus-visible {
  left: 0.75rem;
  top: 0.75rem;
  width: auto;
  height: auto;
  z-index: 100;
  border-radius: 10px;
  background: #0b4f64;
  color: #fff;
  padding: 0.55rem 0.8rem;
}

.lp-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(191, 208, 233, 0.7);
  background: rgba(248, 252, 255, 0.82);
  backdrop-filter: blur(12px);
}

.lp-topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lp-brand:hover {
  text-decoration: none;
}

.lp-brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}

.lp-brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.lp-brand-text {
  font-size: 1.02rem;
}

.lp-nav {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.lp-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #bfd1e4;
  background: rgba(255, 255, 255, 0.85);
  color: #234868;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, filter 0.15s ease, background-color 0.2s ease;
}

.lp-icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lp-icon-btn:hover {
  text-decoration: none;
  background: #edf4ff;
}

.lp-nav-link {
  font-weight: 700;
  color: #34516a;
  padding: 0.5rem 0.65rem;
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  letter-spacing: -0.01em;
  padding: 0.68rem 1.05rem;
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.lp-btn-app {
  white-space: nowrap;
  flex-shrink: 0;
}

.lp-btn:hover {
  text-decoration: none;
}

.lp-btn:active {
  transform: translateY(1px) scale(0.985);
  filter: brightness(0.99);
}

.lp-btn-primary {
  color: #f7fffd;
  background: linear-gradient(150deg, #0b4f64 0%, #0f766e 85%);
  box-shadow: 0 10px 20px rgba(15, 68, 94, 0.26);
}

.lp-btn-primary:hover,
.lp-btn-primary:focus-visible {
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 68, 94, 0.3);
}

.lp-btn-soft {
  color: #234868;
  border-color: #bfd1e4;
  background: rgba(255, 255, 255, 0.7);
}

.lp-hero {
  display: grid;
  gap: 1rem;
  align-items: start;
  padding-block: 1.4rem 0.7rem;
}

.lp-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.77rem;
  font-weight: 800;
  color: #1f5f69;
}

.lp-hero h1 {
  margin-top: 0.3rem;
  margin-bottom: 0.6rem;
  font-size: clamp(1.55rem, 4.4vw, 2.55rem);
  line-height: 1.12;
  max-width: 20ch;
}

.lp-lead {
  margin: 0;
  max-width: 57ch;
  color: #334f66;
  font-size: clamp(1rem, 2vw, 1.1rem);
}

.lp-cta-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
}

.lp-hero-card {
  background: linear-gradient(172deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 251, 255, 0.9) 100%);
  border: 1px solid #d1dced;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 14px 30px rgba(15, 32, 64, 0.08);
}

.lp-hero-card h2 {
  margin-bottom: 0.45rem;
  font-size: 1.1rem;
}

.lp-hero-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
  color: #334e67;
}

.lp-screenshot-gallery {
  margin-top: 0.9rem;
}

.lp-screenshot-gallery--desktop {
  display: none;
}

.lp-screenshot-gallery--mobile {
  display: block;
  margin-bottom: 0.55rem;
}

.lp-screenshot-scroller {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.15rem 0.12rem 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.lp-screenshot-card {
  margin: 0;
  flex: 0 0 min(66vw, 210px);
  border: 1px solid #cfdaeb;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 22px rgba(23, 37, 84, 0.08);
  scroll-snap-align: start;
}

.lp-screenshot-card img {
  display: block;
  width: 100%;
  height: auto;
}

.lp-features,
.lp-use-cases,
.lp-process,
.lp-faq,
.lp-final-cta {
  margin-top: 1.4rem;
}

.lp-section-intro {
  margin-top: 0.42rem;
  color: #355875;
  max-width: 70ch;
}

.landing-page #funktionen,
.landing-page #vorteile,
.landing-page #vorteile-title,
.landing-page #ablauf,
.landing-page #faq,
.landing-page #ratgeber,
.landing-page #ratgeber-inhalt {
  scroll-margin-top: 5.6rem;
}

body.landing-page {
  scroll-behavior: smooth;
}

.landing-page .lp-process>h2 {
  margin-bottom: 0.85rem;
}

.landing-page .lp-process p {
  margin-top: 0.72rem;
  line-height: 1.7;
  max-width: 74ch;
}

.landing-page .lp-process .lp-article-section {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid #d7e1ef;
}

.landing-page .lp-process .lp-article-section:first-of-type {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}

.landing-page .lp-process .lp-article-section>h3 {
  margin-bottom: 0.55rem;
}

.landing-page .lp-process .lp-article-section h4 {
  margin-top: 1rem;
  margin-bottom: 0.45rem;
  font-size: 0.98rem;
  color: #2f4f67;
}

.landing-page .lp-link-list {
  margin: 0.72rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.38rem;
}

.landing-page .lp-link-list li {
  margin: 0;
}

.lp-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.7rem;
  border: 1px solid #cfdaeb;
  border-radius: 0.9rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 20px rgba(23, 37, 84, 0.05);
}

.lp-compare-table th,
.lp-compare-table td {
  text-align: left;
  padding: 0.72rem 0.82rem;
  border-bottom: 1px solid #d7e1ef;
  vertical-align: top;
}

.lp-compare-table tr:last-child th,
.lp-compare-table tr:last-child td {
  border-bottom: 0;
}

.lp-compare-table th {
  width: 34%;
  color: #2f4f67;
  font-size: 0.88rem;
}

.lp-compare-table td {
  color: #36566f;
}

.lp-feature-grid {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.7rem;
}

.lp-feature {
  border: 1px solid #cfdaeb;
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(23, 37, 84, 0.06);
}

.lp-feature h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.lp-feature p {
  margin: 0;
  color: #3e5f78;
}

.lp-steps {
  margin: 0.68rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.lp-steps li {
  border: 1px solid #cedbec;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.66);
  padding: 0.72rem 0.8rem;
}

.lp-use-case-list {
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.lp-use-case-list li {
  border: 1px solid #cedbec;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.7rem 0.8rem;
}

.lp-faq-list {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.65rem;
}

.lp-faq-item {
  border: 1px solid #cfdaeb;
  border-radius: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 20px rgba(23, 37, 84, 0.05);
}

.lp-faq-item h3 {
  margin-bottom: 0.35rem;
  font-size: 1rem;
}

.lp-faq-item p {
  margin: 0;
  color: #3e5f78;
}

.lp-final-cta {
  border: 1px solid #bfd5e4;
  border-radius: 1.15rem;
  background: linear-gradient(165deg, #ffffff 0%, #e8f7f5 100%);
  padding: 1.2rem;
  text-align: center;
  box-shadow: 0 14px 28px rgba(15, 55, 84, 0.08);
}

.lp-final-cta p {
  margin-top: 0.4rem;
  margin-bottom: 0.95rem;
  color: #355875;
}

.lp-footer {
  padding-block: 1rem 1.4rem;
  color: #4f6680;
  font-size: 0.9rem;
}

.lp-footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.lp-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
}

.lp-back-link {
  width: fit-content;
  margin-bottom: 0.7rem;
}

.lp-legal-wrap {
  padding-block: 1.2rem 1.8rem;
}

.lp-legal-main {
  padding-block: 1.1rem 1.6rem;
}

.lp-legal-content {
  max-width: 860px;
}

.lp-legal-content h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.5rem, 3.4vw, 2rem);
}

.lp-legal-content h2 {
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
}

.lp-legal-content p,
.lp-legal-content ul {
  margin-top: 0.42rem;
  color: #35536b;
}

.lp-legal-content ul {
  padding-left: 1.15rem;
  display: grid;
  gap: 0.24rem;
}

@media (min-width: 760px) {
  .contracts-table-mobile-hint {
    display: none;
  }

  .contracts-table-launch {
    display: block;
  }

  .lp-hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.3rem;
    padding-top: 2rem;
  }

  .lp-screenshot-gallery--desktop {
    display: block;
    margin-top: 0.15rem;
  }

  .lp-screenshot-gallery--mobile {
    display: none;
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-scroller {
    justify-content: flex-end;
    overflow: visible;
    scroll-snap-type: none;
    -webkit-overflow-scrolling: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-scroller::-webkit-scrollbar {
    display: none;
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-card {
    flex-basis: min(14vw, 130px);
  }

  .lp-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2>.reminder-editor {
    grid-column: 1 / -1;
  }

  .reminder-editor-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card {
    padding: 1.3rem;
  }

  .bottom-nav-link {
    flex-direction: row;
    gap: 0.35rem;
    font-size: 0.78rem;
  }

  .bottom-nav-icon {
    width: 1rem;
    height: 1rem;
  }

}

@media (min-width: 1024px) and (hover: hover) and (pointer: fine) {
  .lp-screenshot-gallery--desktop .lp-screenshot-scroller {
    gap: 0.9rem;
    overflow: visible;
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-card {
    transform-origin: center center;
    transition:
      transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
      box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 320ms ease,
      filter 320ms ease;
    will-change: transform;
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-scroller:hover .lp-screenshot-card {
    transform: scale(0.9);
    opacity: 0.72;
    filter: saturate(0.92);
  }

  .lp-screenshot-gallery--desktop .lp-screenshot-scroller:hover .lp-screenshot-card:hover {
    transform: scale(1.26) translateY(-8px);
    opacity: 1;
    filter: none;
    box-shadow: 0 22px 45px rgba(15, 32, 64, 0.28);
    z-index: 2;
  }
}

@media (max-width: 620px) {
  .topbar-actions .user-chip {
    display: none;
  }

  .landing-page #funktionen,
  .landing-page #vorteile,
  .landing-page #vorteile-title,
  .landing-page #ablauf,
  .landing-page #faq,
  .landing-page #ratgeber,
  .landing-page #ratgeber-inhalt {
    scroll-margin-top: 4.8rem;
  }

  .lp-nav-link {
    display: none;
  }
}

@media (max-width: 760px) {
  .contracts-overdue-dialog {
    max-height: min(90vh, 820px);
    padding: 0.78rem;
  }

  .contracts-overdue-item-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .contracts-overdue-item-date {
    margin-top: 0.15rem;
  }

  .contracts-overdue-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .contracts-overdue-date-wrap,
  .contracts-overdue-status-wrap {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .contracts-overdue-btn {
    width: 100%;
  }

  .bottom-nav {
    display: flex;
    position: fixed;
    overflow: visible;
  }

  .btn-with-icon {
    width: 42px;
    min-height: 42px;
    padding: 0;
  }

  .btn-with-icon .logout-text {
    display: none;
  }

  .bottom-nav-label {
    display: none;
  }

  .bottom-nav-link {
    min-height: 52px;
    flex: 1 1 50%;
    width: 100%;
    gap: 0;
  }

  .bottom-nav-link-create {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    min-height: 52px;
    padding: 0;
    border-radius: 999px;
    justify-self: auto;
    z-index: 2;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.25);
  }

  .bottom-nav-link-create:active {
    transform: translate(-50%, -50%) scale(0.98);
    filter: brightness(0.98);
  }

  .bottom-nav-link-create .bottom-nav-icon {
    width: 1.2rem;
    height: 1.2rem;
  }

}

@media (min-width: 1024px) {
  body.is-auth {
    padding-bottom: 1.8rem;
  }

  .app-shell {
    padding-top: 1.5rem;
  }

  .bottom-nav {
    position: sticky;
    top: 84px;
    left: auto;
    right: auto;
    bottom: auto;
    width: min(1080px, 100% - 1.5rem);
    margin: 0 auto 0.9rem;
    border-radius: 1rem;
    box-shadow: none;
  }
}
