﻿/* ---------------- Wochenansicht + Belegung ---------------- */

.weekgrid,
.assignmentWeek{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 860px){
  .weekgrid,
  .assignmentWeek{
    grid-template-columns: 1fr;
  }
}

.weekday__title,
.daycol__title{
  font-weight: 900;
  letter-spacing: 0.2px;
}

.weeklist{ display:flex; flex-direction:column; gap: 10px; }

.time-week-review__meta{
  max-width: 58ch;
}

.time-week-review__actions{
  align-items: flex-start;
}

.weekitem,
.assignCard{
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.daycol__head{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.list{ display:flex; flex-direction:column; gap: 10px; }
.list__item{
  display:flex;
  gap: 12px;
  align-items:flex-start;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid rgba(226,232,240,.95);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.94));
  box-shadow: var(--shadow2);
}

.error{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239,68,68,.25);
  background: rgba(239,68,68,.10);
  color: #991b1b;
}
.ok{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(16,185,129,.25);
  background: rgba(16,185,129,.10);
  color: #065f46;
}
.hidden{ display:none; }

/* Mobile: Tabelle stapeln + Labels pro Zeile */
@media (max-width: 820px){
  .table__head{ display:none; }
  .table__row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .table__row > div{
    display:flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed rgba(226,232,240,.8);
    padding-bottom: 6px;
    align-items:flex-start;
  }
  .table__row > div:last-child{
    border-bottom: none;
    padding-bottom: 0;
    justify-content: flex-end;
  }

  .table__row > div::before{
    content: "";
    color: var(--muted);
    font-weight: 800;
    font-size: 12px;
    padding-right: 10px;
    flex: 0 0 auto;
  }
  /* generische Standardlabels werden bei Spezialtabellen ueberschrieben */
  .table__row > div:nth-child(1)::before{ content: "Wert"; }
  .table__row > div:nth-child(2)::before{ content: "Info"; }

  .table--admin-leaves .admin-leaves-actions .btn{
    flex: 1 1 auto;
  }
}


@media (max-width: 380px){
  .card .row.row-between.row-wrap.mt-12{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card .row.row-between.row-wrap.mt-12 > .row.row-gap{ grid-column: 1 / -1; }
  .card .row.row-between.row-wrap.mt-12 > .kpi:nth-of-type(3){ grid-column: 1 / -1; }
}

.global-busy{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.global-busy.is-active{ opacity: 1; transform: translateY(0); }
.global-busy__bar{
  height: 3px;
  background: linear-gradient(90deg, var(--blue), #60a5fa, var(--blue));
  background-size: 200% 100%;
  animation: uiBusy 1.1s linear infinite;
}
.global-busy__label{
  margin-left: auto;
  width: fit-content;
  background: rgba(15,23,42,.88);
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-bottom-left-radius: 12px;
}
@keyframes uiBusy { from { background-position: 0% 0; } to { background-position: 200% 0; } }

.app-loader{
  position: fixed;
  inset: 0;
  z-index: 119;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, visibility .18s ease;
}
.app-loader.is-visible{
  opacity: 1;
  visibility: visible;
}
.app-loader__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(248, 250, 252, .68);
  backdrop-filter: blur(2px);
}
.app-loader__card{
  position: relative;
  z-index: 1;
  min-width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(11,91,211,.14);
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 50px rgba(15,23,42,.14);
}
.app-loader__logo{
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
}
.app-loader__logo::after{
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 16px;
  border: 2px solid rgba(11,91,211,.14);
  animation: appLoaderPulse 1.2s ease-in-out infinite;
}
.app-loader__n{
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), #60a5fa);
  box-shadow: 0 0 0 1px rgba(11,91,211,.06);
}
.app-loader__n--left{ left: 6px; animation: appLoaderBeat 1s ease-in-out infinite; }
.app-loader__n--right{ right: 6px; animation: appLoaderBeat 1s ease-in-out .18s infinite; }
.app-loader__n--diag{
  left: 18px;
  top: 2px;
  bottom: 2px;
  transform: rotate(-28deg);
  transform-origin: center;
  animation: appLoaderBeatDiag 1s ease-in-out .09s infinite;
}
.app-loader__text{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.app-loader__text strong{
  font-size: 15px;
  color: var(--text);
}
.app-loader__text span{
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@keyframes appLoaderBeat{
  0%, 100%{ transform: translateY(0) scaleY(1); opacity: .82; }
  50%{ transform: translateY(-1px) scaleY(1.08); opacity: 1; }
}
@keyframes appLoaderBeatDiag{
  0%, 100%{ transform: rotate(-28deg) translateY(0) scaleY(1); opacity: .82; }
  50%{ transform: rotate(-28deg) translateY(-1px) scaleY(1.08); opacity: 1; }
}
@keyframes appLoaderPulse{
  0%, 100%{ transform: scale(.94); opacity: .35; }
  50%{ transform: scale(1.02); opacity: .7; }
}
@media (prefers-reduced-motion: reduce){
  .global-busy__bar, .app-loader__logo::after, .app-loader__n{ animation: none !important; }
}

.ui-toaststack{
  position: fixed;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(560px, calc(100vw - 24px));
  pointer-events: none;
}
.ui-toast{
  position: relative;
  display:flex;
  align-items:flex-start;
  gap:14px;
  background: rgba(255,255,255,.99);
  border:1px solid rgba(148,163,184,.28);
  border-left-width: 6px;
  box-shadow: 0 20px 50px rgba(15,23,42,.22);
  border-radius: 18px;
  padding: 16px 18px 18px;
  opacity:0;
  transform: translateY(-10px) scale(.985);
  transition: opacity .2s ease, transform .2s ease;
  cursor:pointer;
  pointer-events: auto;
  overflow: hidden;
}
.ui-toast.is-visible{ opacity:1; transform: translateY(0) scale(1); }
.ui-toast__icon{
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  line-height: 1;
  font-size: 18px;
  background: rgba(148,163,184,.14);
}
.ui-toast__content{ min-width: 0; flex: 1 1 auto; }
.ui-toast__title{
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.ui-toast__text{
  font-size: 15px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--text);
}
.ui-toast__close{
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 20px;
  line-height: 1;
  padding: 2px 0 0;
  cursor: pointer;
}
.ui-toast__close:hover{ color: #0f172a; }
.ui-toast__bar{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(148,163,184,.16);
}
.ui-toast__bar::after{
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  transform-origin: left center;
  animation: uiToastBar linear forwards;
  animation-duration: var(--ui-toast-duration, 4200ms);
}
.ui-toast--success{ border-left-color: #10b981; color: #047857; }
.ui-toast--success .ui-toast__icon{ background: rgba(16,185,129,.14); color: #047857; }
.ui-toast--error{ border-left-color: #ef4444; color: #b91c1c; }
.ui-toast--error .ui-toast__icon{ background: rgba(239,68,68,.12); color: #b91c1c; }
.ui-toast--warning{ border-left-color: #f59e0b; color: #b45309; }
.ui-toast--warning .ui-toast__icon{ background: rgba(245,158,11,.14); color: #b45309; }
.ui-toast--info{ border-left-color: #2563eb; color: #1d4ed8; }
.ui-toast--info .ui-toast__icon{ background: rgba(37,99,235,.12); color: #1d4ed8; }
@keyframes uiToastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.inline-status{
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
}
.inline-status--success{ color: var(--ok); }
.inline-status--error{ color: var(--danger); }
.inline-status--warning{ color: #b45309; }
.inline-status--info{ color: var(--blue); }

.ui-modal-root{
  position: fixed;
  inset: 0;
  z-index: 140;
}
.ui-modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.44);
  backdrop-filter: blur(4px);
}
.ui-modal-wrap{
  position: absolute;
  inset: 0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.ui-modal{
  width: min(520px, 100%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(15,23,42,.26);
  border: 1px solid rgba(226,232,240,.95);
  overflow: hidden;
}
.ui-modal__head,
.ui-modal__body,
.ui-modal__actions{ padding: 16px 18px; }
.ui-modal__head{ border-bottom: 1px solid var(--line); }
.ui-modal__title{ margin: 0; font-size: 18px; }
.ui-modal__message{ color: var(--text); line-height: 1.45; }
.ui-modal__input{ margin-top: 14px; width: 100%; }
.ui-modal__actions{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.ui-no-scroll{ overflow:hidden; }
.btn.is-busy{ opacity:.8; }
.time-status-group{ justify-content:flex-end; }
.pill-gray{ background:#e2e8f0; color:#334155; }
.pill-yellow{ background:#fef3c7; color:#92400e; }

@media (max-width: 640px){
  .ui-toaststack{ top: 12px; left: 12px; right: 12px; width: auto; transform: none; }
  .ui-modal__actions{ flex-direction: column-reverse; }
  .ui-modal__actions .btn{ width: 100%; }
  .time-status-group{ justify-content:flex-start; }
}


/* Paket 2.14 - Todo / Report sauber abschliessen */
.todo-summary{ margin-top: 12px; }
.todo-meta{ margin-top:8px; display:flex; flex-direction:column; gap:4px; font-size:12px; color:var(--muted); }
.todo-locked-note{ display:inline-flex; align-items:center; justify-content:center; min-height:32px; padding:0 10px; border-radius:999px; border:1px solid var(--line); color:var(--muted); font-size:12px; }
.table--todos .table__row.is-done{ opacity:.86; }


.admin-users-toolbar{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.admin-users-toolbar__actions,
.admin-users-toolbar__search{
  display:flex;
  width:100%;
  gap:10px;
}
.admin-users-toolbar__actions{
  align-items:center;
  justify-content:flex-start;
}
.admin-users-toolbar__search{
  align-items:flex-end;
  flex-wrap:wrap;
}
.admin-users-toolbar__search .field.grow{
  flex:1 1 320px;
  min-width:240px;
}


/* Hotfix - Route-Reset, einheitliche Desktop-Breiten und Admin-Toolbar */
.admin-users-toolbar__actions--right{
  justify-content:flex-end;
}
#view-assignments .card,
#view-todos .card{
  width:100%;
  max-width:100%;
}
#view-assignments .assignmentMatrixWrap,
#view-todos .table{
  width:100%;
  max-width:100%;
}



/* v0.18.0 - Mobile polish (iPhone 15 / kleine Touch-Devices) */
html{
  -webkit-text-size-adjust: 100%;
}
body{
  overflow-x: hidden;
}
img, svg, canvas{
  max-width: 100%;
}
.topbar__right,
.topbarActions{
  min-width: 0;
}
.topbarActions > *{
  min-width: 0;
}
.notifMenu,
.topmenu__panel,
.usermenu{
  max-width: min(420px, calc(100vw - 24px));
}
.row-wrap > .field,
.row-wrap > .kpi,
.row-wrap > .segmented,
.row-wrap > .time-mode-switch{
  min-width: 0;
}
.table__row > div,
.table__row > div > *{
  min-width: 0;
}
.table__row > div > :last-child{
  overflow-wrap: anywhere;
}
.assignmentMatrixWrap,
.table,
.topmenu__panel,
.usermenu,
.ui-modal,
.card,
.kpi,
.entity-form,
.entity-form__section,
.assignmentMonth__cell,
.order-card,
.assignCard,
.assignChip,
.list__item{
  max-width: 100%;
}

@media (min-width: 521px){
  .notifMenu{
    width: min(420px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    min-width: 360px;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse){
  .footer{
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
    flex-wrap: wrap;
  }
}

@media (max-width: 700px){
  .topbar{
    gap: 10px;
  }
  .brand{
    gap: 10px;
    min-width: 0;
  }
  .brand__text{
    min-width: 0;
  }
  .brand__title{
    font-size: 15px;
  }
  .brand__sub{
    font-size: 11px;
  }
  .topbarActions{
    gap: 8px;
  }
  .userbtn{
    padding-right: 8px;
  }
}


@media (max-width: 900px){
  body.app-view-time .time-hero-card__layout{
    grid-template-columns: 1fr;
  }
  body.app-view-time .time-hero-card__side{
    align-items: flex-start;
  }
  body.app-view-time .time-hero-card__action{
    width: 140px;
    height: 140px;
    font-size: 30px;
  }
}
@media (max-width: 520px){
  .shell,
  .shell__main,
  .container,
  #app,
  .view,
  .grid,
  .card,
  .list,
  .list__item,
  .table,
  .entity-form,
  .entity-form__section{
    min-width: 0;
  }

  .brand__sub{
    display: none;
  }

  .topbar{
    min-height: calc(58px + env(safe-area-inset-top));
    padding-top: calc(10px + env(safe-area-inset-top));
    align-items: center;
  }

  .topbar__right{
    min-width: 0;
    max-width: 58%;
  }

  .topbarActions{
    gap: 6px;
  }

  .userbtn,
  .iconbtn{
    min-width: 44px;
    min-height: 44px;
  }

  .usermenu,
  .topmenu__panel,
  .notifMenu{
    left: calc(12px + env(safe-area-inset-left));
    right: calc(12px + env(safe-area-inset-right));
    width: auto;
    max-width: none;
  }

  .usermenu{
    top: calc(64px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
  }

  .topmenu__panel{
    top: calc(10px + env(safe-area-inset-top));
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px);
    overflow: auto;
  }

  .notifMenu{
    position: fixed;
    top: calc(68px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 92px);
  }

  .bottomnav{
    left: calc(10px + env(safe-area-inset-left));
    right: calc(10px + env(safe-area-inset-right));
    bottom: 20px;
    padding: 8px 8px 8px;
  }


  .row.row-wrap,
  .row.row-between.row-wrap,
  .row.row-gap.row-wrap,
  .assignmentsToolbar,
  .admin-users-toolbar__search,
  .admin-users-toolbar__actions,
  .entity-form__actions,
  .order-card__actions,
  .time-group__head,
  .daycol__head{
    width: 100%;
  }

  .row.row-wrap > .field,
  .row.row-gap.row-wrap > .field,
  .row.row-wrap > .segmented,
  .row.row-wrap > .time-mode-switch,
  .row.row-gap.row-wrap > .segmented,
  .row.row-gap.row-wrap > .time-mode-switch,
  .row.row-wrap > .kpi,
  .row.row-gap.row-wrap > .kpi,
  .admin-users-toolbar__search .field,
  .admin-users-toolbar__actions .btn,
  .assignmentsToolbar > .field,
  .assignmentsToolbar > .segmented{
    flex: 1 1 100%;
    width: 100%;
    min-width: 0 !important;
  }

  .segmented{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .segmented__btn{
    min-width: 0;
    text-align: center;
  }

  .card .row.row-between.row-wrap.mt-12 > .row.row-gap{
    grid-template-columns: minmax(52px, 56px) minmax(0, 1fr) minmax(52px, 56px);
  }

  .time-group__title{
    width: 100%;
    flex-wrap: wrap;
  }

  .time-group__date{
    margin-left: 0;
  }

  .table__row > div{
    align-items: flex-start;
  }

  .table__row > div > :last-child{
    text-align: right;
  }

  .table__row > div:last-child{
    justify-content: flex-start;
  }

  .table__row > div:last-child > :last-child,
  .table__row > div:last-child .row,
  .table__row > div:last-child .cell-pills{
    width: 100%;
    justify-content: flex-start;
  }

  .table--time-grouped .time-entry-actions{
    width: 100%;
    justify-content: flex-start;
  }

  .table--time-grouped .time-entry-actions__dropdown{
    width: 100%;
  }

  .table--time-grouped .time-entry-actions__toggle{
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .table--time-grouped .time-entry-actions__menu{
    left: 0;
    right: auto;
  }

  .table--overview,
  .table--orders,
  .table--todos,
  .table--time-grouped,
  .table--tools,
  .table--tools-admin,
  .table--loans-admin,
  .table--vacation-overview,
  .table--admin-leaves{
    border: 0;
    background: transparent;
  }

  .table--tools-admin .table__body,
  .table--loans-admin .table__body{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 2px;
  }

  .table--tools-admin .table__row,
  .table--loans-admin .table__row{
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15,23,42,.06);
  }

  .table--tools-admin .table__row > div,
  .table--loans-admin .table__row > div{
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px dashed rgba(226,232,240,.9);
    padding-bottom: 8px;
    white-space: normal !important;
  }

  .table--tools-admin .table__row > div:last-child,
  .table--loans-admin .table__row > div:last-child{
    border-bottom: none;
    padding-bottom: 0;
  }

  .table--tools-admin .table__row > div:nth-child(1)::before{ content: "Werkzeug"; }
  .table--tools-admin .table__row > div:nth-child(2)::before{ content: "Seriennr."; }
  .table--tools-admin .table__row > div:nth-child(3)::before{ content: "Status"; }
  .table--tools-admin .table__row > div:nth-child(4)::before{ content: "Aktion"; }
  .table--loans-admin .table__row > div:nth-child(1)::before{ content: "Werkzeug"; }
  .table--loans-admin .table__row > div:nth-child(2)::before{ content: "Benutzer"; }
  .table--loans-admin .table__row > div:nth-child(3)::before{ content: "Von"; }
  .table--loans-admin .table__row > div:nth-child(4)::before{ content: "Bis"; }
  .table--loans-admin .table__row > div:nth-child(5)::before{ content: "Notiz"; }
  .table--loans-admin .table__row > div:nth-child(6)::before{ content: "Status"; }
  .table--loans-admin .table__row > div:nth-child(7)::before{ content: "Aktion"; }

  .table--tools-admin .row.row-gap.row-wrap,
  .table--loans-admin .row.row-gap.row-wrap,
  .table--overview .overview-lockcell,
  .table--admin-leaves .admin-leaves-actions{
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .table--tools-admin .btn,
  .table--loans-admin .btn,
  .table--overview .btn,
  .table--admin-leaves .btn,
  .table--orders .btn,
  .table--todos .btn{
    min-width: 0;
    width: 100%;
  }

  .assignmentMonth__cell{
    padding: 12px;
  }

  .assignmentMonth__cellHead{
    align-items: flex-start;
  }

  .order-card__meta{
    grid-template-columns: 1fr;
  }

  .order-card__actions{
    flex-direction: column;
  }

  .profile-password-grid,
  .dashboard-kpi-grid,
  .grid-tiles,
  .admin-general-grid,
  .weekgrid,
  .assignmentWeek{
    grid-template-columns: 1fr;
  }

  .app-loader__card{
    min-width: 0;
    padding: 16px;
    gap: 12px;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse){
  body.app-view-login
{
    padding-bottom: 0;
  }

  body.app-view-login .footer
 {
    padding-top: 0px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }

  body.app-view-login .bottomnav
{
    display: none;
  }
}


@media (max-width: 520px){
  body.app-view-time .time-header{
    gap: 12px;
    align-items: stretch;
  }

  body.app-view-time .time-header__intro,
  body.app-view-time .time-summary-strip,
  body.app-view-time .time-status-group,
  body.app-view-time .time-entries-head,
  body.app-view-time .time-table-meta,
  body.app-view-time .time-table-pagination{
    width: 100%;
  }

  body.app-view-time .time-header__intro{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }

  body.app-view-time .time-header__user{
    width: 100%;
    text-align: center;
  }

  body.app-view-time .time-header__manage-box{
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  body.app-view-time .time-header__manage-box .field,
  body.app-view-time .time-header__manage-pill,
  body.app-view-time .time-summary-pill,
  body.app-view-time .time-status-group .pill{
    width: 100%;
    max-width: 100%;
  }

  body.app-view-time .time-header__manage-pill,
  body.app-view-time .time-summary-pill,
  body.app-view-time .time-status-group .pill{
    justify-content: center;
    text-align: center;
  }

  body.app-view-time .time-summary-strip,
  body.app-view-time .time-status-group{
    justify-content: center;
  }

  body.app-view-time .time-entries-head{
    gap: 12px;
  }

  body.app-view-time .time-export-actions{
    width: 100%;
    justify-content: stretch;
    gap: 12px;
    padding-top: 4px;
  }

  body.app-view-time .time-export-actions .btn{
    flex: 1 1 100%;
    min-width: 0;
  }

  body.app-view-time .table--time-grouped .table__row > div:nth-child(1)::before{ content: "Typ"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(2)::before{ content: "Projekt"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(3)::before{ content: "Start"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(4)::before{ content: "Ende"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(5)::before{ content: "Pause"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(6)::before{ content: "Netto"; }
  body.app-view-time .table--time-grouped .table__row > div:nth-child(7)::before{ content: "Aktionen"; }

  body.app-view-time .table--time-grouped .table__body{
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  body.app-view-time .table--time-grouped .time-group{
    margin-top: 0;
  }

  body.app-view-time .table--time-grouped .time-group__head{
    flex-wrap: wrap;
    align-items: flex-start;
  }

  body.app-view-time .table--time-grouped .time-group__title{
    width: 100%;
    flex-wrap: wrap;
    row-gap: 6px;
  }

  body.app-view-time .table--time-grouped .time-group__head .cell-pills{
    width: 100%;
    justify-content: flex-start;
  }

  body.app-view-time .table--time-grouped .table__row{
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px 14px;
  }

  body.app-view-time .table--time-grouped .table__row > div{
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    justify-content: initial;
    align-items: start;
    gap: 10px;
  }

  body.app-view-time .table--time-grouped .table__row > div::before{
    padding-right: 0;
  }

  body.app-view-time .table--time-grouped .table__row > div > :last-child{
    text-align: right;
    min-width: 0;
  }

  body.app-view-time .table--time-grouped .table__row .cell-pills{
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  body.app-view-time .table--time-grouped .table__row > div.nowrap{
    white-space: normal !important;
    overflow: visible;
    text-overflow: clip;
  }

  body.app-view-time .table--time-grouped .time-entry-actions{
    justify-content: stretch;
  }

  body.app-view-time .table--time-grouped .time-entry-actions__dropdown,
  body.app-view-time .table--time-grouped .time-entry-actions__menu{
    width: 100%;
  }

  body.app-view-time .table--time-grouped .time-entry-actions__menu{
    min-width: 0;
    position: static;
    margin-top: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15,23,42,.10);
  }

  body.app-view-time .time-table-meta,
  body.app-view-time .time-table-pagination{
    display: block;
    width: 100%;
  }

  body.app-view-time .time-table-meta__text,
  body.app-view-time .time-table-pagination__text{
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 12px 0;
    padding: 0;
    text-align: left;
    white-space: normal;
    overflow: visible;
    line-height: 1.45;
  }

  body.app-view-time .time-table-meta__actions,
  body.app-view-time .time-table-pagination__actions{
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
    align-items: stretch;
    justify-content: flex-start;
  }

  body.app-view-time .time-table-meta__actions > *,
  body.app-view-time .time-table-pagination__actions > *{
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  body.app-view-time #timeResetFilters,
  body.app-view-time #timePrevPage,
  body.app-view-time #timeNextPage,
  body.app-view-time .time-table-meta__page{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    height: auto;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
  }

  body.app-view-time .time-hero-card__clock{
    font-size: clamp(52px, 18vw, 74px);
  }

  body.app-view-time .time-hero-card__project,
  body.app-view-time .time-hero-card__aux,
  body.app-view-time .time-hero-card__action,
  body.app-view-time .time-dropdown,
  body.app-view-time .time-dropdown__menu{
    width: 100%;
    max-width: none;
  }

  body.app-view-time .time-hero-card__action{
    width: 168px;
    height: 168px;
    border-radius: 999px;
    font-size: 34px;
  }

  body.app-view-time .time-quick-actions__inner{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px){
  body.app-view-time .time-header__manage-box{
    gap: 10px;
  }

  body.app-view-time .time-header__manage-box .field:first-child,
  body.app-view-time .time-header__day-lock-field{
    flex: 1 1 100%;
  }

  body.app-view-time .time-header__manage-box .select,
  body.app-view-time .time-header__day-lock-field .btn{
    width: 100%;
    min-width: 0;
  }

  body.app-view-time .table--time-grouped .time-group__head{
    padding: 12px;
  }

  body.app-view-time .table--time-grouped .cell-pills{
    gap: 6px;
  }

  body.app-view-time .table--time-grouped .table__row{
    grid-template-columns: 1fr;
    padding: 12px;
  }

  body.app-view-time .table--time-grouped .table__row > div{
    grid-template-columns: 1fr;
    gap: 6px;
  }

  body.app-view-time .table--time-grouped .table__row > div::before{
    font-size: 11px;
  }

  body.app-view-time .table--time-grouped .table__row > div > :last-child{
    width: 100%;
    text-align: left;
  }

  body.app-view-time .table--time-grouped .table__row > div:last-child > :last-child{
    width: 100%;
  }
}



.time-quick-actions{
  margin-top: 12px;
}
.time-hero-card{
  padding: 24px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(11,91,211,.14), transparent 40%),
    linear-gradient(180deg, rgba(243,247,252,.98), rgba(237,242,249,.94));
  box-shadow: 0 8px 24px rgba(15,23,42,.08);
}
.time-hero-card.is-running{
  box-shadow: 0 8px 24px rgba(15,23,42,.08), 0 0 0 1px rgba(16,185,129,.14);
}
.time-hero-card__layout{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: stretch;
}
.time-hero-card__main,
.time-hero-card__side{
  min-width: 0;
}
.time-hero-card__side{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
}
.time-hero-card__header{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap: 12px;
  flex-wrap:wrap;
}
.time-hero-card__clock{
  margin-top: 12px;
  font-size: clamp(64px, 8vw, 112px);
  line-height: .9;
  letter-spacing: -.02em;
  font-weight: 900;
  color: #091634;
}
.time-hero-card__today{
  margin-top: 12px;
  color: #475569;
  font-size: 15px;
}
.time-hero-card__project{
  margin-top: 18px;
  max-width: 420px;
}
.time-hero-card__project .select,
.time-hero-card__aux .input{
  min-height: 48px;
  border-radius: 14px;
}
.time-hero-card__action{
  width: 168px;
  height: 168px;
  border: 0;
  border-radius: 999px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .04em;
  color: #fff;
  box-shadow: 0 18px 34px rgba(11,91,211,.18);
}
.time-hero-card__action.is-start{
  background: linear-gradient(180deg, #1a5fd0, #0b4fae);
}
.time-hero-card__action.is-stop{
  background: linear-gradient(180deg, #ef4444, #dc2626);
  box-shadow: 0 18px 34px rgba(239,68,68,.2);
}
.time-hero-card__action:disabled{
  opacity: .6;
  cursor: not-allowed;
}
.time-hero-card__aux{
  width: 100%;
  max-width: 200px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.95);
}
.time-hero-card__sub{
  margin-top: 12px;
  color: #475569;
  font-size: 14px;
  line-height: 1.45;
}

.time-entry-actions{
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
}
.time-entry-actions__dropdown{
  width: auto;
}
.time-entry-actions__toggle{
  min-width: 0;
  height: 36px;
  padding-inline: 12px;
  border-radius: 12px;
  box-shadow: none;
}
.time-entry-actions__menu{
  min-width: 150px;
  right: 0;
  left: auto;
}
.time-entry-actions__dropdown--inline{
  width: 100%;
}
.time-entry-actions__menu.time-entry-actions__menu--inline{
  position: static;
  right: auto;
  left: auto;
  margin-top: 8px;
  min-width: 0;
  width: min(240px, 100%);
  margin-left: auto;
}
.time-entry-actions__menu.time-entry-actions__menu--floating{
  z-index: 160;
}
.time-header__day-lock-field{
  align-self: flex-end;
  flex: 0 0 auto;
}
.time-header__day-lock-label{
  opacity: .75;
}
.time-group{
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,252,.96));
  box-shadow: 0 12px 30px rgba(15,23,42,.05);
  overflow: visible;
}
.time-group + .time-group{
  margin-top: 14px;
}
.time-group__head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, rgba(248,250,252,.98), rgba(241,245,249,.94));
  border-bottom: 1px solid rgba(226,232,240,.92);
}
.time-group__head.is-day-locked{
  background: linear-gradient(180deg, rgba(254,242,242,.92), rgba(255,255,255,.98));
  border-bottom-color: rgba(248,113,113,.28);
}
.table--time-grouped .table__body > .time-group .table__row{
  border-top: 1px solid rgba(226,232,240,.78);
}
.table--time-grouped .table__body > .time-group .table__row:first-of-type{
  border-top: 0;
}

.table--time-grouped .table__head,
.table--time-grouped .table__row{
  grid-template-columns: minmax(104px, .82fr) minmax(280px, 2.15fr) 68px 68px 74px minmax(92px, 104px) 96px;
}
.table--time-grouped .table__head > div:last-child,
.table--time-grouped .table__row > div:last-child{
  justify-self: end;
}
.table--time-grouped .table__row > div:nth-child(2){
  min-width: 0;
}
.table--time-grouped .table__row > div.nowrap{
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-header{
  display:grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items:flex-start;
  gap: 14px 16px;
}
.time-header__actions{
  display: contents;
  width: auto;
}
.time-header__manage-space{
  display:none;
}
.time-header__manage-box{
  display:flex;
  flex-direction:row;
  flex-wrap: nowrap;
  align-items:flex-end;
  gap: 8px;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  min-width: 220px;
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.time-header__manage-box .field{
  min-width: 0;
}
.time-header__manage-box .field:first-child{
  flex: 0 1 260px;
}
.time-header__manage-box .select{
  min-width: 220px;
}

.time-summary-strip{
  display:flex;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 100%;
}
.time-summary-pill{
  display:inline-flex;
  align-items:center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(248,250,252,.96);
  border: 1px solid rgba(226,232,240,.95);
  color: #334155;
  font-size: 13px;
  line-height: 1.3;
}
.time-summary-pill b{
  color:#0f172a;
}
.time-summary-pill.is-ok{
  background: rgba(236,253,245,.98);
  border-color: rgba(167,243,208,.95);
}
.time-summary-pill.is-alert{
  background: rgba(255,251,235,.98);
  border-color: rgba(253,230,138,.95);
}
.time-summary-pill.is-running{
  background: rgba(239,246,255,.98);
  border-color: rgba(147,197,253,.95);
}
.time-flow-hints{
    display:none;
  }
.time-flow-hints{
    display:none;
}
.time-flow-hint,
.time-filter-panel,
.time-manual-section{
  border: 1px solid rgba(226,232,240,.92);
  border-radius: 16px;
  background: rgba(248,250,252,.78);
}
.time-flow-hint{
  display:flex;
  flex-direction:column;
  gap: 4px;
  padding: 12px 14px;
}
.time-flow-hint b{
  font-size: 14px;
  color: var(--text);
}
.time-flow-hint span{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.time-filter-panel,
.time-manual-section{
  padding: 14px;
}
.time-filter-panel.hidden{
  display:none;
}
.time-filter-panel__intro,
.time-manual-section__title{
  display:flex;
  flex-direction:column;
  gap: 4px;
}
.time-filter-panel__intro{
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.time-filter-panel__intro > div{
  display:flex;
  flex-direction:column;
  gap: 4px;
  min-width: 0;
}
.time-filter-panel__intro b,
.time-manual-section__title{
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
}
.time-filter-panel__intro span{
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.time-quick-actions__status{
  margin-top: 14px;
}
.time-dropdown{
  position: relative;
}
.time-dropdown__menu{
  position:absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display:grid;
  gap: 4px;
  min-width: 190px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(226,232,240,.95);
  box-shadow: 0 18px 38px rgba(15,23,42,.14);
}
.time-dropdown__menu.hidden{
  display:none;
}
.time-dropdown__item{
  appearance:none;
  border:0;
  background: transparent;
  text-align:left;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  color: var(--text);
}
.time-dropdown__item:disabled{
  color: var(--muted);
  opacity: .65;
  cursor: not-allowed;
}
.time-dropdown__item:hover,
.time-dropdown__item:focus-visible{
  background: rgba(11,91,211,.08);
  outline: none;
}
.time-dropdown__item:disabled:hover,
.time-dropdown__item:disabled:focus-visible{
  background: transparent;
  outline: none;
}
.time-dropdown__item--danger{
  color: #b91c1c;
}
.time-dropdown__item--danger:hover,
.time-dropdown__item--danger:focus-visible{
  background: rgba(239,68,68,.10);
}

.time-quick-actions__inner{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.time-quick-actions__inner .btn{
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  white-space: normal;
}
#btnStart,
#btnStop{
  min-height: 62px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: .03em;
  border-radius: 18px;
}
#btnStart{
  box-shadow: 0 14px 28px rgba(11,91,211,.18);
}
#btnStop{
  box-shadow: 0 14px 28px rgba(220,22,58,.14);
}

.time-quick-actions__status{
  margin-top: 10px;
  text-align: center;
  line-height: 1.4;
}
.time-summary-strip > .pill{
  min-width: 148px;
  min-height: 68px;
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  opacity: 1;
  font-size: 14px;
}
.time-kpi-row{
  align-items: stretch;
  gap: 12px;
}
.time-kpi-group{
  display:flex;
  gap: 12px;
  flex-wrap: wrap;
}
.time-kpi{
  position: relative;
  overflow: hidden;
  min-width: 170px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(226,232,240,.98);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,247,251,.96));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84), 0 12px 28px rgba(15,23,42,.06);
}
.time-kpi::after{
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
  background: rgba(148,163,184,.45);
}
.time-kpi .kpi__label{
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.time-kpi .kpi__value{
  margin-top: 8px;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -.02em;
}
.time-kpi--month::after{ background: rgba(100,116,139,.65); }
.time-kpi--soll::after{ background: rgba(59,130,246,.7); }
.time-kpi--ist::after{ background: rgba(16,185,129,.72); }
.time-kpi--delta::after{ background: rgba(245,158,11,.72); }
.time-kpi--delta .kpi__value{ color: #7c2d12; }
@media (max-width: 860px){
  .time-hero-card{
    padding: 16px;
  }
  .time-hero-card__clock{
    font-size: clamp(34px, 13vw, 56px);
  }
  .time-header{
    display:grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }
  .time-header__intro{
    grid-column: 1;
    grid-row: 1;
    display:flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
  }
  .time-header__actions{
    display: contents;
    width: auto;
  }
  .time-header__manage-box{
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    align-self: start;
    min-width: 0;
    max-width: none;
    width: 100%;
    flex-wrap: wrap;
  }
  .time-header__manage-box .field{
    width: 100%;
  }
  .time-header__day-lock-field{
    align-self: stretch;
  }
  .time-summary-strip{
    grid-column: 1;
    grid-row: 3;
    justify-content: stretch;
  }
  .time-summary-pill,
  .time-summary-strip > .pill{
    width: 100%;
  }
  .time-filter-panel__intro{
    flex-direction: column;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse){
  body.app-view-time{
    padding-bottom: 80px;
  }
}

.time-table-meta,
.time-table-pagination{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.time-table-meta__text,
.time-table-pagination__text{
  flex: 1 1 auto;
  min-width: 0;
}

.time-table-meta__actions,
.time-table-pagination__actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.time-table-meta__page{
  margin: 0;
  justify-content: center;
}
@media (max-width: 860px){
  .time-flow-hints{
    grid-template-columns: 1fr;
  }
}

.orders-toolbar__actions,
.orders-meta__actions,
.orders-pagination__actions{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.orders-meta,
.orders-pagination{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.orders-meta__text,
.orders-pagination__text{
  flex: 1 1 auto;
  min-width: 0;
}

.orders-meta__page{
  margin: 0;
  justify-content: center;
}

@media (max-width: 520px){
  .orders-toolbar__actions,
  .orders-meta__actions,
  .orders-pagination__actions{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .orders-toolbar__actions .btn,
  .orders-meta__actions > *,
  .orders-pagination__actions > *{
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .orders-toolbar__actions .btn,
  .orders-meta__actions .btn,
  .orders-pagination__actions .btn,
  .orders-meta__page{
    min-height: 44px;
    height: auto;
    white-space: normal;
    line-height: 1.25;
    justify-content: center;
    text-align: center;
  }

  .orders-meta,
  .orders-pagination{
    display: block;
    width: 100%;
  }

  .orders-meta__text,
  .orders-pagination__text{
    display: block;
    width: 100%;
    margin: 0 0 12px 0;
    line-height: 1.45;
    text-align: left;
  }
}

@media (max-width: 520px){
  body.app-view-todos .table--todos{
    border: 0;
    background: transparent;
    overflow: visible;
  }

  body.app-view-todos .table--todos .table__body{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
  }

  body.app-view-todos .table--todos .table__row{
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
  }

  body.app-view-todos .table--todos .table__row > div{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    white-space: normal !important;
    border-bottom: 1px dashed rgba(226,232,240,.9);
    padding-bottom: 10px;
  }

  body.app-view-todos .table--todos .table__row > div:last-child{
    border-bottom: 0;
    padding-bottom: 0;
  }

  body.app-view-todos .table--todos .table__row > div::before{
    min-width: 0;
    padding-right: 0;
    font-weight: 800;
    color: var(--muted);
  }

  body.app-view-todos .table--todos .todo-status-cell,
  body.app-view-todos .table--todos .todo-actions-cell,
  body.app-view-todos .table--todos .todo-actions{
    justify-content: flex-start;
    width: 100%;
  }

  body.app-view-todos .table--todos .todo-status-cell .input{
    min-width: 0;
    width: 100%;
    margin: 0;
  }

  body.app-view-todos .table--todos .todo-actions{
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-wrap: nowrap;
  }

  body.app-view-todos .table--todos .todo-actions .btn,
  body.app-view-todos .table--todos .todo-actions-placeholder,
  body.app-view-todos .table--todos .todo-locked-note{
    width: 100%;
    min-width: 0;
  }

  body.app-view-todos .table--todos .todo-actions .btn{
    min-height: 44px;
    height: auto;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  body.app-view-todos .table--todos .cell-pills{
    width: 100%;
    justify-content: flex-start;
  }

  body.app-view-todos .table--todos .todo-meta{
    gap: 6px;
    line-height: 1.4;
  }
}

@media (max-width: 520px){
  body.app-view-todos .card > .row.row-between.row-wrap .row.row-gap.row-wrap{
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  body.app-view-todos .card > .row.row-between.row-wrap .row.row-gap.row-wrap .btn{
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: auto;
    white-space: normal;
    line-height: 1.25;
  }
}
