/* NAVO – Akten: Übersicht, Aktenlisten, Akte mit Kopf, Reitern und Dokument-Ablage. Farben nur über die Design-Variablen (hell/dunkel). */
.ak-sub {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}
.ak-search {
  position: relative;
  min-width: 260px;
  flex: 0 1 340px;
}
.ak-search input {
  width: 100%;
  padding-left: 34px;
}
.ak-search .ic {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--faint);
  pointer-events: none;
}
.ak-hits {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
  max-height: 60vh;
  overflow: auto;
}
.ak-hits a {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.ak-hits a:last-child {
  border-bottom: 0;
}
.ak-hits a:hover,
.ak-hits a.on {
  background: var(--accent-soft);
}
.ak-hits small {
  color: var(--muted);
  display: block;
}

/* Kacheln je Aktenart */
.ak-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.ak-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  min-height: 132px;
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.ak-tile:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}
.ak-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ak-tile-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ak-ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.ak-ico .ic {
  width: 21px;
  height: 21px;
}
.ak-tile b {
  font-size: 15px;
  display: block;
  line-height: 1.25;
}
.ak-num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ak-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ak-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}
.ak-tile.lock .ak-ico {
  background: var(--panel-2);
  color: var(--muted);
}
.ak-tile.add {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  box-shadow: none;
  background: transparent;
}
.ak-tile.add:hover {
  color: var(--accent);
}

.ak-sec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 10px;
  flex-wrap: wrap;
}
.ak-sec h2 {
  margin: 0;
  font-size: 17px;
}
.ak-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
  background: var(--panel);
}
.ak-seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ak-seg button.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

/* Fristen-Liste */
.ak-due {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 4px 14px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.ak-due:last-child {
  border-bottom: 0;
}
.ak-due:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.ak-due .d {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ak-due .t {
  min-width: 0;
}
.ak-due .t b {
  font-weight: 600;
}
.ak-due .t span {
  color: var(--muted);
  font-size: 12.5px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-due.bad .d {
  color: var(--bad);
}
.ak-due.warn .d {
  color: var(--warn);
}

/* Liste einer Aktenart */
.ak-list .ak-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) 120px 26px;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
}
.ak-list .ak-row:last-child {
  border-bottom: 0;
}
.ak-list .ak-row:hover {
  background: var(--panel-2);
  text-decoration: none;
}
.ak-row .ak-ico {
  width: 36px;
  height: 36px;
}
.ak-row .nm {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-row .sb {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-row .ar {
  color: var(--faint);
}
.ak-row.muted .nm {
  color: var(--muted);
}

/* Akte: Kopf */
.ak-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-bottom: 16px;
}
.ak-headcard {
  padding: 18px 20px;
}
.ak-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.ak-title .ak-ico {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}
.ak-title .ak-ico .ic {
  width: 26px;
  height: 26px;
}
.ak-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.ak-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px 18px;
  margin: 16px 0 0;
}
.ak-fact {
  min-width: 0;
}
.ak-fact dt {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 1px;
}
.ak-fact dd {
  margin: 0;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.ak-fact.strong dd {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ak-fact.bad dd {
  color: var(--bad);
}
.ak-fact.warn dd {
  color: var(--warn);
}
.ak-fact.ok dd {
  color: var(--ok);
}
.ak-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.ak-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12.5px;
  background: var(--panel-2);
  text-decoration: none;
  max-width: 100%;
}
.ak-links a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.ak-links .ic {
  width: 14px;
  height: 14px;
  flex: none;
}
.ak-next {
  padding: 16px 18px;
}
.ak-next h3 {
  margin: 0 0 8px;
  font-size: 14px;
}
.ak-nx {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ak-nx .badge {
  flex: none;
}
.ak-nx > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.ak-head > * {
  min-width: 0;
}
.ak-nx:last-child {
  border-bottom: 0;
}
.ak-nx b {
  font-weight: 600;
}
.ak-nx .muted {
  white-space: nowrap;
}
.ak-note {
  margin-top: 12px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px;
  white-space: pre-wrap;
}

/* Unterschriebene Dokumente – prominent */
.ak-signed {
  border: 1px solid var(--ok);
  background: var(--ok-soft);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.ak-signed h3 {
  margin: 0 0 8px;
  font-size: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ok);
}
.ak-signed-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
}
.ak-signed-list button {
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  min-width: 0;
}
.ak-signed-list button:hover {
  border-color: var(--ok);
}
.ak-signed-list b {
  display: block;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-signed-list small {
  color: var(--muted);
}
.ak-signed-list .ic {
  color: var(--ok);
  flex: none;
  width: 20px;
  height: 20px;
}

/* Dokumente: Kategorien + Liste */
.ak-docs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.ak-cats {
  position: sticky;
  top: 12px;
  padding: 6px;
}
.ak-cats button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ak-cats button:hover {
  background: var(--panel-2);
}
.ak-cats button.on {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.ak-cats button.drop-over {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.ak-cats .n {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.ak-cats .ic {
  width: 16px;
  height: 16px;
  flex: none;
}
.ak-files {
  min-height: 260px;
  position: relative;
  padding: 0;
  overflow: hidden;
}
.ak-files.file-over::after {
  content: 'Dateien hier ablegen – sie werden der Akte zugeordnet';
  position: absolute;
  inset: 8px;
  border: 2px dashed var(--accent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 85%, transparent);
  display: grid;
  place-items: center;
  font-weight: 650;
  color: var(--accent);
  pointer-events: none;
}
.ak-ftools {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ak-ftools .ak-search {
  min-width: 180px;
  flex: 1 1 200px;
}
.ak-file {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 130px 96px 34px;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.ak-file:last-child {
  border-bottom: 0;
}
.ak-file.cost {
  grid-template-columns: 34px minmax(0, 1fr) 110px 96px 120px;
  cursor: default;
}
.ak-file.cost[data-bid] {
  cursor: pointer;
}
.ak-file.cost .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ak-new .spacer {
  flex: 1;
}
.ak-file:hover {
  background: var(--panel-2);
}
.ak-file[draggable='true'] {
  cursor: grab;
}
.ak-file .fi {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--panel-2);
  color: var(--muted);
}
.ak-file .fi .ic {
  width: 17px;
  height: 17px;
}
.ak-file .fi.pdf {
  color: var(--bad);
}
.ak-file .fi.img {
  color: var(--info);
}
.ak-file .fi.beleg {
  color: var(--accent);
}
.ak-file .nm {
  min-width: 0;
}
.ak-file .nm b {
  display: block;
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ak-file .nm span {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.ak-file .dt {
  color: var(--muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.ak-file .menu {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.ak-file .menu:hover {
  background: var(--line);
  color: var(--text);
}
.ak-tag {
  font-size: 11px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}
.ak-tag.sig {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
  font-weight: 600;
}
.ak-tag.link {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: transparent;
}
.ak-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}
.ak-empty .ic {
  width: 36px;
  height: 36px;
  color: var(--faint);
  display: block;
  margin: 0 auto 10px;
}
.ak-sugg {
  margin: 0 0 14px;
}
.ak-sugg-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.ak-sugg-row:last-child {
  border-bottom: 0;
}
.ak-sugg-row .t {
  flex: 1 1 220px;
  min-width: 0;
}
.ak-sugg-row .t b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
}
.ak-sugg-row .t span {
  color: var(--muted);
  font-size: 12px;
}

/* Fristen */
.ak-fr {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 110px minmax(0, 1fr) 290px;
  gap: 10px 14px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.ak-fr:last-child {
  border-bottom: 0;
}
.ak-fr .tt b {
  font-weight: 600;
}
.ak-fr .tt span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.ak-fr .dd {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.ak-fr .act {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.ak-fr.done {
  opacity: 0.65;
}

/* Verlauf */
.ak-tl {
  position: relative;
  margin: 0;
  padding: 4px 0 4px 26px;
  list-style: none;
}
.ak-tl::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.ak-tl li {
  position: relative;
  padding: 0 0 16px;
}
.ak-tl li::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--accent);
}
.ak-tl li.schaden::before,
.ak-tl li.mangel::before {
  border-color: var(--bad);
}
.ak-tl li.km::before {
  border-color: var(--info);
}
.ak-tl li.frist::before {
  border-color: var(--ok);
}
.ak-tl .h {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}
.ak-tl .h b {
  font-weight: 600;
}
.ak-tl .m {
  color: var(--muted);
  font-size: 12px;
}
.ak-tl .x {
  margin-top: 3px;
  white-space: pre-wrap;
  font-size: 13.5px;
}
.ak-tl .ph {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.ak-tl .ph button {
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 4px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  gap: 5px;
  align-items: center;
}
.ak-new {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  align-items: start;
}
.ak-new .full {
  grid-column: 1 / -1;
}
.ak-km {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 64px;
  margin: 8px 0 4px;
}
.ak-km i {
  flex: 1;
  max-width: 44px;
  background: var(--info);
  opacity: 0.8;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

/* Kosten */
.ak-bars {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  height: 170px;
  padding: 8px 4px 0;
}
.ak-bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  gap: 4px;
  min-width: 0;
}
.ak-bar i {
  width: 100%;
  max-width: 38px;
  background: var(--accent);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}
.ak-bar span {
  font-size: 11px;
  color: var(--muted);
}
.ak-bar em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Aktenart-Editor */
.ak-fedit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 34px;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
}
.ak-iconpick {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.ak-iconpick button {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.ak-iconpick button.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.ak-card-mini .ak-chips {
  margin-top: 8px;
}
.ak-card-mini .ak-signed-list {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Handy / App-Ansicht: einspaltig */
@media (max-width: 860px) {
  .ak-head {
    grid-template-columns: 1fr;
  }
  .ak-docs {
    grid-template-columns: 1fr;
  }
  .ak-cats {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 6px;
    scrollbar-width: none;
  }
  .ak-cats button {
    width: auto;
    flex: none;
    white-space: nowrap;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
  }
  .ak-cats .n {
    margin-left: 4px;
  }
}
@media (max-width: 720px) {
  .ak-search {
    min-width: 0;
    flex: 1 1 100%;
  }
  .ak-tiles {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .ak-tile {
    min-height: 0;
    padding: 12px;
    gap: 8px;
  }
  .ak-tile p {
    display: none;
  }
  .ak-tile-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .ak-ico {
    width: 34px;
    height: 34px;
  }
  .ak-num {
    font-size: 22px;
  }
  .ak-due {
    grid-template-columns: 1fr auto;
  }
  .ak-due .d {
    grid-column: 1 / 2;
    font-size: 13px;
  }
  .ak-due .t {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .ak-list .ak-row {
    grid-template-columns: 36px minmax(0, 1fr) 20px;
  }
  .ak-list .ak-row .c3,
  .ak-list .ak-row .c4 {
    display: none;
  }
  .ak-list .ak-row .c2b {
    display: block;
  }
  .ak-title h1 {
    font-size: 19px;
  }
  .ak-headcard {
    padding: 14px;
  }
  .ak-facts {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }
  .ak-file {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
  }
  .ak-file.cost {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }
  .ak-file .dt,
  .ak-file .ty {
    display: none;
  }
  .ak-fr {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .ak-fr .dd {
    grid-row: 1;
    grid-column: 2;
    text-align: right;
  }
  .ak-fr .st {
    grid-column: 1 / -1;
  }
  .ak-fr .act {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .ak-new {
    grid-template-columns: 1fr;
  }
  .ak-bars {
    gap: 3px;
    height: 140px;
  }
  .ak-bar em {
    display: none;
  }
  .ak-fedit {
    grid-template-columns: minmax(0, 1fr) 110px 34px;
  }
}
.ak-list .ak-row .c2b {
  display: none;
}
.ak-card-mini .spacer {
  flex: 1;
}
