body.theme-hell {
    background: linear-gradient(120deg, #f5f5f5 80%, #e0eaff 100%);
    color: #222;
}

body.theme-dunkel {
    background: linear-gradient(120deg, #222 80%, #444 100%);
    color: #f5f5f5;
}

body.theme-darkblue {
    background: linear-gradient(120deg, #0a2342 80%, #274690 100%);
    color: #eaf6ff;
}

body.theme-darkgreen {
    background: linear-gradient(120deg, #1b2e1b 80%, #3e5641 100%);
    color: #eaffea;
}

/* Global tooltip styling (JS-driven for cross-browser consistency) */
body.js-tooltips .has-tooltip[data-tooltip]::after,
body.js-tooltips .has-tooltip[data-tooltip]::before {
    display: none;
}

#global-tooltip {
    position: fixed;
    inset: auto auto auto auto;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-family: inherit;
    white-space: nowrap;
    z-index: 5000;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -6px);
    transition: opacity 0.12s ease;
}

#global-tooltip.is-visible {
    opacity: 1;
}

nav {
    background: #222;
    color: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

nav.main-nav {
    position: sticky;
    top: 0;
    z-index: 1500;
    padding: 0.6em;
    display: flex;
    align-items: center;
    gap: 0.9em;
    color: #fff;
}

.main-nav .nav-left,
.main-nav .nav-center,
.main-nav .nav-right {
    display: flex;
    align-items: center;
    gap: 0.6em;
    min-height: 64px;
}

.main-nav .nav-left {
    position: relative;
    z-index: 1;
    justify-content: flex-start;
    min-width: 0;
}

.main-nav .nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(calc(-50% - 100px));
    z-index: 2;
    justify-content: center;
    padding: 0 10px;
}

.main-nav .nav-right {
    position: relative;
    z-index: 1;
    margin-left: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
    min-width: 0;
}

.checkout-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-invert {
    filter: invert(1);
}

.checkout-item-title {
    opacity: 0.9;
}

.checkout-timer {
    font-variant-numeric: tabular-nums;
}

.checkout-action-btn {
    padding: 2px 6px;
}

.main-nav .main-nav-link {
    color: #fff;
    font-weight: 500;
}

.main-nav .main-nav-link:visited,
.main-nav .main-nav-link:hover,
.main-nav .main-nav-link:active {
    color: #fff;
}

.theme-toggle-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

.nav-user-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    position: relative;
    line-height: 1;
}

.nav-user-link {
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5em;
}

.nav-user-link:visited,
.nav-user-logout:visited {
    color: #fff;
}

.build-info {
    position: absolute;
    top: 3px;
    left: 8px;
    pointer-events: none;
    user-select: none;
}

.build-info-text {
    white-space: nowrap;
}

button,
.btn {
    border-radius: 6px;
    padding: 0.5em 1.2em;
    font-weight: 500;
    transition: background 0.2s;
}

body.theme-hell .btn-primary {
    background: #274690;
    color: #fff;
}

body.theme-dunkel .btn-primary {
    background: #444;
    color: #eaffea;
}

body.theme-darkblue .btn-primary {
    background: #0a2342;
    color: #eaf6ff;
}

body.theme-darkgreen .btn-primary {
    background: #3e5641;
    color: #eaffea;
}

/* Projekt-Details Grid */
.proj-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.proj-field {
    background: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.proj-field .proj-label {
    font-weight: 600;
    opacity: .85;
}

.proj-field .proj-value {
    white-space: normal;
    word-break: break-word;
    flex: 1 1 auto;
}

.proj-field-full {
    grid-column: 1 / -1;
}

/* Neues Projekt: Form-Layout (ohne Bootstrap Grid) */
.project-new-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.project-new-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 820px) {
    .project-new-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.project-new-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.project-new-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
}

.project-new-form .form-control,
.project-new-form .form-select,
.project-new-form input,
.project-new-form select,
.project-new-form textarea {
    width: 100%;
    box-sizing: border-box;
}

.project-new-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.privacy-label {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-right: 6px;
}

.privacy-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.privacy-toggle__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.privacy-toggle__track {
    display: inline-block;
    width: 35px;
    height: 18px;
    background: #e74c3c;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.18);
}

.privacy-toggle__thumb {
    display: block;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.privacy-toggle__input:checked+.privacy-toggle__track {
    background: #2ecc71;
}

.privacy-toggle__input:checked+.privacy-toggle__track .privacy-toggle__thumb {
    transform: translateX(17px);
}

.privacy-toggle__input:focus-visible+.privacy-toggle__track {
    outline: 2px solid rgba(46, 204, 113, 0.5);
    outline-offset: 2px;
}

body.theme-dunkel .privacy-toggle__track,
body.theme-darkblue .privacy-toggle__track,
body.theme-darkgreen .privacy-toggle__track {
    background: #c0392b;
}

/* Action center in header */
.action-indicator-wrap {
    display: inline-flex;
    align-items: center;
    margin-left: 0;
}

.action-indicator {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.action-indicator:hover,
.action-indicator:focus-visible {
    transform: none;
}

.action-indicator__icon-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.action-indicator__icon {
    display: block;
    width: 50px;
    height: 59px;
    object-fit: contain;
}

.action-indicator__badge {
    left: 0%;
    bottom: 2px;
}


/* Kleine Icon-Buttons vereinheitlichen */
.btn-icon-xs {
    padding: 2px 6px;
    line-height: 1;
}

.icon-img-xs {
    /* 15% größer als Basis (14px) */
    width: var(--icon-size, calc(14px * 1.15));
    height: var(--icon-size, calc(14px * 1.15));
    display: inline-block;
    vertical-align: text-bottom;
    filter: none;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 1px;
}

.icon-click {
    cursor: pointer;
}

.icon-text-btn {
    /* 5% größer */
    font-weight: 700;
    font-size: calc(12px * 1.05);
    display: inline-block;
    line-height: 1;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 1px 3px;
}

/* Dashboard: "P+" (neues Projekt) soll 3x größer sein */
.icon-text-btn.pplus-btn {
    font-size: 1.5em;
    line-height: 1;
    padding: 2px 6px;
}

/* Dark themes: etwas hellere Rahmenfarbe für Kontrast */
body.theme-dunkel .icon-img-xs,
body.theme-darkblue .icon-img-xs,
body.theme-darkgreen .icon-img-xs,
body.theme-dunkel .icon-text-btn,
body.theme-darkblue .icon-text-btn,
body.theme-darkgreen .icon-text-btn {
    border-color: rgba(255, 255, 255, 0.25);
}

/* ToDo list layout: title left, action icon right */
.dashboard-widget[data-widget-id="todo"] {
    font-family: "Times New Roman", Times, serif;
    font-size: 12px;
    font-weight: 400;
}

.dashboard-widget[data-widget-id="todo"] .dashboard-widget-handle {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

.dashboard-widget[data-widget-id="todo"] .overview-body--todos .todo-header {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #000;
}

.dashboard-widget[data-widget-id="todo"] .overview-body--todos .todo-hours {
    font-family: "Times New Roman", Times, serif;
    font-size: 10px;
    font-weight: 700;
}

.overview-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.overview-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.overview-list .todo-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-list .todo-title.todo-title-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: normal;
}

.overview-list .todo-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.todo-kind-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 14px;
    padding: 1px 4px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.todo-kind-badge--task {
    background: #d9f4df;
    color: #185b2d;
}

.todo-kind-badge--spontan {
    background: #ffe8bd;
    color: #7a4a00;
}

.todo-kind-badge--project {
    background: #d8e7ff;
    color: #194c8a;
}

.note-timesheet-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 999px;
    background: #d8e7ff;
    color: #194c8a;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.note-timesheet-badge--compact {
    margin-left: 0;
    padding: 1px 5px;
}

.overview-list .todo-date {
    flex: 0 0 auto;
}

/* Dashboard ToDo list: columns + drag handle */
.overview-body--todos .todo-cols,
.overview-body--todos #todos-list .todo-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) var(--todo-date-width, 72px) var(--todo-delivery-width, 92px) var(--todo-hours-width, 68px);
    align-items: center;
    gap: 8px;
}

.overview-body--todos #todos-list .todo-row--interactive {
    cursor: pointer;
}

.overview-body--todos #todos-list .todo-row--interactive:hover,
.overview-body--todos #todos-list .todo-row--interactive:focus-visible {
    background: rgba(0, 0, 0, 0.045);
    outline: none;
}

body.theme-dunkel .overview-body--todos #todos-list .todo-row--interactive:hover,
body.theme-dunkel .overview-body--todos #todos-list .todo-row--interactive:focus-visible,
body.theme-darkblue .overview-body--todos #todos-list .todo-row--interactive:hover,
body.theme-darkblue .overview-body--todos #todos-list .todo-row--interactive:focus-visible,
body.theme-darkgreen .overview-body--todos #todos-list .todo-row--interactive:hover,
body.theme-darkgreen .overview-body--todos #todos-list .todo-row--interactive:focus-visible {
    background: rgba(255, 255, 255, 0.08);
}

.overview-body--todos .todo-header {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.55);
    padding: 0 0 4px 0;
}

body.theme-dunkel .overview-body--todos .todo-header,
body.theme-darkblue .overview-body--todos .todo-header,
body.theme-darkgreen .overview-body--todos .todo-header {
    color: rgba(255, 255, 255, 0.65);
}

.overview-body--todos .todo-drag-handle {
    cursor: grab;
    user-select: none;
    opacity: 0.7;
}

.overview-body--todos .todo-drag-handle:active {
    cursor: grabbing;
}

.overview-body--todos .todo-hours {
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.overview-body--todos .todo-date {
    width: var(--todo-date-width, 72px);
    min-width: var(--todo-date-width, 72px);
}

.overview-body--todos .todo-delivery {
    width: var(--todo-delivery-width, 92px);
    min-width: var(--todo-delivery-width, 92px);
}

.overview-body--todos .todo-hours {
    width: var(--todo-hours-width, 96px);
    min-width: var(--todo-hours-width, 96px);
}

/* Ausgeklappter Projektbereich: eingerückter Kasten mit Leitlinie */
.proj-details {
    position: relative;
    margin-left: 28px;
    width: calc(100% - 28px);
    box-sizing: border-box;
    /* Einrückung nach rechts */
    display: none;
    /* standardmäßig eingeklappt */
}

.proj-details.show {
    display: block;
}

/* Aufgabenliste unter dem Projekt, mit Leitlinie analog zu Details */
.proj-tasks {
    position: relative;
    margin-left: 28px;
    width: calc(100% - 28px);
    box-sizing: border-box;
    overflow-x: auto;
    /* allow horizontal scroll for wide task tables */
}

.proj-tasks::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(39, 70, 144, 0.6);
    border-radius: 1px;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tasks-head {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, auto);
    gap: 0;
    padding: 4px 0;
    color: #666;
    min-width: max-content;
}

body.theme-dunkel .tasks-head,
body.theme-darkblue .tasks-head,
body.theme-darkgreen .tasks-head {
    color: #aaa;
}

.tasks-head>div {
    padding: 0 8px;
    opacity: .85;
}

.task-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, auto);
    gap: 0;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
    min-width: max-content;
}

body.theme-dunkel .task-row,
body.theme-darkblue .task-row,
body.theme-darkgreen .task-row {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.task-row>div {
    padding: 0 8px;
}

.task-row>div+div {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-dunkel .task-row>div+div,
body.theme-darkblue .task-row>div+div,
body.theme-darkgreen .task-row>div+div {
    border-left-color: rgba(255, 255, 255, 0.12);
}

.task-col-desc {
    min-width: 160px;
}

.task-col-comment {
    color: #666;
}

.task-col-estimated,
.task-col-due,
.task-col-prio {
    white-space: nowrap;
}

body.theme-dunkel .task-col-comment,
body.theme-darkblue .task-col-comment,
body.theme-darkgreen .task-col-comment {
    color: #aaa;
}

body.theme-dunkel .task-meta,
body.theme-darkblue .task-meta,
body.theme-darkgreen .task-meta {
    color: #aaa;
}

.task-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.tasks-head>div[data-col="actions"],
.task-row>div[data-col="actions"] {
    min-width: 170px;
}

.task-actions-view,
.task-actions-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.task-actions-view .icon-img-xs,
.task-actions-view .icon-text-btn,
.task-actions-edit .icon-img-xs,
.task-actions-edit .icon-text-btn {
    flex: 0 0 auto;
}

.btn-icon-xxs {
    padding: 2px 6px;
    line-height: 1;
}

/* Kopf letzte Spalte rechtsbündig */
.tasks-head>div:last-child {
    text-align: right;
}

/* Einzeiliges Aufgabenformular */
.task-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Aufgaben-Badge Toggle-Icon */
.tasks-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin-right: 6px;
}

.twisty-icon {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    display: inline-block;
    transition: transform 0.15s ease;
}

.tasks-toggle.open .twisty-icon {
    transform: rotate(90deg);
}

.proj-details::before {
    /* vertikaler Strich links als Zugehörigkeitsindikator */
    content: '';
    position: absolute;
    left: -14px;
    /* vor dem Kasten */
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(39, 70, 144, 0.6);
    /* dezent in Primärfarbe */
    border-radius: 1px;
}

.proj-details .task-collapse {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-left: 4px solid #274690;
    /* Akzent links am Kasten */
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.03);
}

body.theme-dunkel .proj-details .task-collapse,
body.theme-darkblue .proj-details .task-collapse,
body.theme-darkgreen .proj-details .task-collapse {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

/* Projektliste: Spalten optisch trennen */
.projects-table thead th+th {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.projects-table tbody td+td {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.projects-table tbody tr+tr td {
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

body.theme-dunkel .projects-table thead th+th,
body.theme-darkblue .projects-table thead th+th,
body.theme-darkgreen .projects-table thead th+th,
body.theme-dunkel .projects-table tbody td+td,
body.theme-darkblue .projects-table tbody td+td,
body.theme-darkgreen .projects-table tbody td+td {
    border-left-color: rgba(255, 255, 255, 0.12);
}

body.theme-dunkel .projects-table tbody tr+tr td,
body.theme-darkblue .projects-table tbody tr+tr td,
body.theme-darkgreen .projects-table tbody tr+tr td {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.projects-col-w-110 {
    width: 110px;
}

.projects-col-w-80 {
    width: 80px;
}

.projects-col-w-90 {
    width: 90px;
}

.projects-col-w-100 {
    width: 100px;
}

.projects-col-w-120 {
    width: 120px;
}

.projects-col-w-130 {
    width: 130px;
}

.projects-col-w-140 {
    width: 140px;
}

.projects-col-w-150 {
    width: 150px;
}

.projects-col-w-160 {
    width: 160px;
}

.projects-col-w-210 {
    width: 210px;
}

.projects-col-w-220 {
    width: 220px;
}

.tasks-empty-note {
    padding: 4px 8px;
}

/* Edit-Grid analog zur Ansicht */
.proj-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.proj-edit-grid .proj-field .proj-value>input,
.proj-edit-grid .proj-field .proj-value>select,
.proj-edit-grid .proj-field .proj-value>textarea {
    width: 100%;
}

/* Task-Anzahl Badge vor Projekttitel */
.task-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-right: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #274690;
    border-radius: 999px;
}

body.theme-dunkel .task-badge,
body.theme-darkblue .task-badge,
body.theme-darkgreen .task-badge {
    background: #6ea8fe;
    color: #0a2342;
}

.task-form-wrap {
    border: 1px dashed rgba(0, 0, 0, 0.2);
    background: rgba(0, 0, 0, 0.02);
}

body.theme-dunkel .task-form-wrap,
body.theme-darkblue .task-form-wrap,
body.theme-darkgreen .task-form-wrap {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.03);
}

/* Nachrichten-Widget (oben rechts) */
.messages-widget {
    width: 100%;
    max-width: none;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.theme-dunkel .messages-widget,
body.theme-darkblue .messages-widget,
body.theme-darkgreen .messages-widget {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.messages-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Wenn ungelesene Chats existieren: Header leicht akzentuieren */
.messages-widget.has-unread .messages-header {
    background: rgba(220, 53, 69, 0.08);
}

body.theme-dunkel .messages-widget.has-unread .messages-header,
body.theme-darkblue .messages-widget.has-unread .messages-header,
body.theme-darkgreen .messages-widget.has-unread .messages-header {
    background: rgba(220, 53, 69, 0.18);
}

body.theme-dunkel .messages-header,
body.theme-darkblue .messages-header,
body.theme-darkgreen .messages-header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.messages-header .msg-icon {
    width: 16px;
    height: 16px;
    opacity: .8;
}

.messages-header .msg-refresh {
    margin-left: auto;
    border: none;
    background: transparent;
    padding: 2px;
}

.messages-header .msg-refresh img {
    width: 14px;
    height: 14px;
    opacity: .8;
}

.messages-inner {
    display: grid;
    grid-template-columns: 180px 1fr;
    height: 260px;
    min-height: 260px;
}

.messages-sidebar {
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow: hidden;
}

.messages-sidebar .sidebar-search {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.messages-sidebar .sidebar-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

body.theme-dunkel .messages-sidebar,
body.theme-darkblue .messages-sidebar,
body.theme-darkgreen .messages-sidebar {
    border-right-color: rgba(255, 255, 255, 0.12);
}

.sidebar-item {
    display: block;
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.sidebar-item .name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-item .name .label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-item .meta {
    font-size: 50%;
    opacity: .7;
}

.sidebar-item.active {
    background: rgba(39, 70, 144, 0.08);
}

/* Nachrichten: Statuspunkt + ungelesen fett */
.presence-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    margin-right: 6px;
    vertical-align: middle;
}

.presence-dot.online {
    background: #28a745;
}

.presence-dot.offline {
    background: #ffc107;
}

.sidebar-item.unread .name {
    font-weight: 800;
}

/* Ungelesen: zusätzlich über Farben hervorheben */
.sidebar-item.unread {
    background: rgba(220, 53, 69, 0.06);
    border-left: 3px solid rgba(220, 53, 69, 0.55);
    padding-left: 7px;
}

.sidebar-item.unread .label {
    color: #dc3545;
}

.sidebar-item.unread:hover {
    background: rgba(220, 53, 69, 0.10);
}

.sidebar-item.unread.active {
    background: rgba(220, 53, 69, 0.14);
}

body.theme-dunkel .sidebar-item.unread,
body.theme-darkblue .sidebar-item.unread,
body.theme-darkgreen .sidebar-item.unread {
    background: rgba(220, 53, 69, 0.14);
    border-left-color: rgba(220, 53, 69, 0.75);
}

body.theme-dunkel .sidebar-item.unread .label,
body.theme-darkblue .sidebar-item.unread .label,
body.theme-darkgreen .sidebar-item.unread .label {
    color: #ff6b7a;
}

.sidebar-item .unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    min-width: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
}

/* Dark themes: ensure readable light text for user list */
body.theme-dunkel .messages-widget .sidebar-item,
body.theme-darkblue .messages-widget .sidebar-item,
body.theme-darkgreen .messages-widget .sidebar-item {
    color: rgba(255, 255, 255, 0.9);
}

body.theme-dunkel .messages-widget .sidebar-item .name,
body.theme-darkblue .messages-widget .sidebar-item .name,
body.theme-darkgreen .messages-widget .sidebar-item .name {
    color: rgba(255, 255, 255, 0.95);
}

.messages-main {
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 0;
}

.messages-body {
    overflow-y: auto;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.msg-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.msg-row.mine {
    align-items: flex-end;
}

/* Chat-Bubble: im Oval steht nur der Nachrichtentext */
.msg-bubble {
    display: inline-flex;
    flex-direction: column;
    width: auto;
    max-width: 100%;
    margin: 2px 0;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.05);
    align-self: flex-start;
    line-height: 1.2;
    box-sizing: border-box;
}

.msg-bubble.mine {
    background: #274690;
    color: #fff;
    align-self: flex-end;
}

.msg-content {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 69%;
    line-height: 1.2;
}

/* Name + Uhrzeit: kleiner und unterhalb des Ovals */
.msg-meta {
    margin-top: 2px;
    font-size: 8px;
    opacity: .75;
    white-space: nowrap;
}

body.theme-dunkel .msg-bubble {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dunkel .msg-bubble.mine {
    background: #6ea8fe;
    color: #0a2342;
}

/* Day separator */
.day-sep {
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: .7;
    margin: 10px 0;
    font-size: 12px;
}

.day-sep::before,
.day-sep::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
}

body.theme-dunkel .day-sep::before,
body.theme-dunkel .day-sep::after,
body.theme-darkblue .day-sep::before,
body.theme-darkblue .day-sep::after,
body.theme-darkgreen .day-sep::before,
body.theme-darkgreen .day-sep::after {
    background: rgba(255, 255, 255, 0.2);
}

.messages-form {
    display: flex;
    gap: 6px;
    padding: 8px 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-dunkel .messages-form,
body.theme-darkblue .messages-form,
body.theme-darkgreen .messages-form {
    border-top-color: rgba(255, 255, 255, 0.12);
}

.messages-form input[type="text"] {
    flex: 1 1 auto;
    min-width: 120px;
}

.messages-form .msg-send {
    border: none;
    background: transparent;
    padding: 2px 6px;
}

.messages-form .msg-send img {
    width: 16px;
    height: 16px;
}

/* Responsiv: bei sehr schmalen Viewports kleinere Breite, damit nichts überläuft */
@media (max-width: 420px) {
    .msg-bubble {
        max-width: 100%;
    }
}

@media (min-width: 1200px) {
    .messages-widget .msg-bubble {
        max-width: 70%;
    }

    .messages-widget .msg-bubble.mine {
        max-width: 70%;
    }
}

/* Übersichtspanel links von Nachrichtenfenster */
.dashboard-overview-panel {
    width: 100%;
    height: 260px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top panels row */
.dashboard-top-panels {
    display: flex;
    gap: 16px;
    align-items: stretch;
}

.dashboard-top-panels>* {
    min-width: 0;
}

/* Use grow ratios instead of fixed % widths so gap doesn't cause overflow */
.dashboard-top-panels .dashboard-overview-panel {
    flex: 3 1 0;
    max-width: none;
}

.dashboard-top-panels .messages-widget {
    flex: 2 1 0;
    max-width: none;
}

@media (max-width: 900px) {
    .dashboard-top-panels {
        flex-direction: column;
    }

    .dashboard-top-panels .dashboard-overview-panel,
    .dashboard-top-panels .messages-widget {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

body.theme-dunkel .dashboard-overview-panel,
body.theme-darkblue .dashboard-overview-panel,
body.theme-darkgreen .dashboard-overview-panel {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-overview-panel header {
    padding: 6px 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.theme-dunkel .dashboard-overview-panel header,
body.theme-darkblue .dashboard-overview-panel header,
body.theme-darkgreen .dashboard-overview-panel header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.dashboard-overview-panel .overview-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    min-height: 0;
}

.overview-body--todos {
    overflow: hidden;
}

/* Dashboard: Rahmen-Panel (wie ToDo/Nachrichten) */
.dashboard-panel {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

body.theme-dunkel .dashboard-panel,
body.theme-darkblue .dashboard-panel,
body.theme-darkgreen .dashboard-panel {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.15);
}

.dashboard-panel header {
    padding: 6px 10px;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.dashboard-panel header:empty {
    display: none;
}

body.theme-dunkel .dashboard-panel header,
body.theme-darkblue .dashboard-panel header,
body.theme-darkgreen .dashboard-panel header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.dashboard-panel .panel-body {
    padding: 10px;
}

.dashboard-panel.dashboard-panel--compact .panel-body {
    padding: 2px 6px;
}

.project-create-table {
    width: 100%;
    border-collapse: collapse;
    border: 0;
}

.project-create-table td {
    border: 0;
    padding: 0;
    vertical-align: middle;
}

.project-create-table .project-create-left {
    white-space: nowrap;
}

.project-create-table .project-create-right {
    text-align: left;
}

.project-create-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
}

.project-create-divider {
    display: inline-block;
    width: 1px;
    height: 30px;
    background: rgba(0, 0, 0, 0.2);
}

body.theme-dunkel .project-create-divider,
body.theme-darkblue .project-create-divider,
body.theme-darkgreen .project-create-divider {
    background: rgba(255, 255, 255, 0.3);
}

.project-create-icons-table {
    border-collapse: separate;
    border-spacing: 0;
    border: 0;
    margin: 0;
}

.project-create-icons-table td {
    border: 0;
    padding: 0;
    vertical-align: middle;
    width: 1%;
    white-space: nowrap;
}

.project-view-trigger {
    text-decoration: none;
}

.project-view-icon-wrap {
    position: relative;
    display: inline-block;
    line-height: 0;
}

.project-view-count-badge {
    position: absolute;
    bottom: 0;
    left: -40%;
    height: 18px;
    min-width: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff3b30;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.action-indicator__icon-wrap .action-indicator__badge {
    left: auto;
    right: calc(-12% - 15px);
    bottom: 2px;
}

/* Bald fällig Button */
.soondue-btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #333);
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: background 0.15s ease;
}

.soondue-btn-label:hover {
    background: rgba(255, 59, 48, 0.08);
}

.soondue-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    height: 20px;
    min-width: 20px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff3b30;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    line-height: 1;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
}

.action-project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-project-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(58, 136, 254, 0.1);
    color: #21446f;
    font-weight: 700;
    line-height: 1;
}

.action-project-tag:hover,
.action-project-tag:focus-visible {
    background: rgba(58, 136, 254, 0.18);
}

.action-project-tag__count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff3b30;
    color: #fff;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

body.theme-dunkel .action-project-tag,
body.theme-darkblue .action-project-tag,
body.theme-darkgreen .action-project-tag {
    background: rgba(255, 255, 255, 0.12);
    color: #f2f5fb;
}

#projects-overview-pane .projects-overview-field {
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 12px;
    overflow: hidden;
}

body.theme-dunkel #projects-overview-pane .projects-overview-field,
body.theme-darkblue #projects-overview-pane .projects-overview-field,
body.theme-darkgreen #projects-overview-pane .projects-overview-field {
    border-color: rgba(255, 255, 255, 0.14);
}

#projects-overview-pane .projects-overview-field .table-responsive {
    width: 100%;
}

#projects-overview-pane .projects-overview-field .projects-table {
    width: 100% !important;
    table-layout: auto;
}

#projects-overview-pane .projects-overview-field .projects-table th[data-col],
#projects-overview-pane .projects-overview-field .projects-table td[data-col] {
    width: auto !important;
}

.proj-detail-wrap .proj-view-section {
    display: block;
}

.proj-detail-wrap .proj-edit-section {
    display: none;
}

.proj-detail-wrap.editing .proj-view-section {
    display: none;
}

.proj-detail-wrap.editing .proj-edit-section {
    display: block;
}

.task-form-field-description {
    min-width: 240px;
    flex: 1 1 320px;
}

.task-form-field-comment {
    min-width: 160px;
    flex: 1 1 200px;
}

.task-form-field-estimated {
    width: 110px;
    flex: 0 0 auto;
}

.task-form-field-due {
    width: 150px;
    flex: 0 0 auto;
}

.task-form-field-assigned {
    width: 160px;
    flex: 0 0 auto;
}

.task-form-field-priority {
    width: 140px;
    flex: 0 0 auto;
}

.privacy-toggle.privacy-toggle--compact {
    margin: 0 8px;
}

#projects-window-pane {
    display: none;
}

#projects-window-frame {
    width: 100%;
    min-height: 960px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    background: transparent;
    padding: 8px;
    overflow-x: auto;
}

body.theme-dunkel #projects-window-frame,
body.theme-darkblue #projects-window-frame,
body.theme-darkgreen #projects-window-frame {
    border-color: rgba(255, 255, 255, 0.15);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal-backdrop.show {
    display: flex;
}

.modal-card {
    background: #fff;
    color: #222;
    border-radius: 8px;
    min-width: 320px;
    max-width: 90vw;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.modal-card--todo-detail {
    width: min(780px, 94vw);
}

.todo-detail-tabs {
    display: flex;
    gap: 2px;
    padding: 8px 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.todo-detail-tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 10px 14px;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    color: inherit;
    opacity: 0.72;
}

.todo-detail-tab.is-active {
    background: rgba(0, 0, 0, 0.06);
    opacity: 1;
}

body.theme-dunkel .todo-detail-tabs,
body.theme-darkblue .todo-detail-tabs,
body.theme-darkgreen .todo-detail-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.theme-dunkel .todo-detail-tab.is-active,
body.theme-darkblue .todo-detail-tab.is-active,
body.theme-darkgreen .todo-detail-tab.is-active {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dunkel .modal-card,
body.theme-darkblue .modal-card,
body.theme-darkgreen .modal-card {
    background: #2b2b2b;
    color: #f0f0f0;
}

.modal-card header {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

body.theme-dunkel .modal-card header,
body.theme-darkblue .modal-card header,
body.theme-darkgreen .modal-card header {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.modal-card .modal-body {
    padding: 12px 14px;
    display: grid;
    gap: 10px;
}

.modal-card .modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 10px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

body.theme-dunkel .modal-card .modal-actions,
body.theme-darkblue .modal-card .modal-actions,
body.theme-darkgreen .modal-card .modal-actions {
    border-top-color: rgba(255, 255, 255, 0.15);
}

.todo-detail-modal-body {
    max-height: 82vh;
    overflow: auto;
}

.modal-card--entity-detail {
    width: min(980px, 96vw);
}

.entity-detail-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.entity-detail-modal-body {
    max-height: 84vh;
    overflow: auto;
    padding: 18px;
}

.entity-detail-shell {
    display: grid;
    gap: 18px;
}

.entity-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.entity-detail-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.68;
}

.entity-detail-heading {
    margin: 4px 0 0;
    font-size: 24px;
    line-height: 1.15;
}

.entity-detail-sub {
    margin-top: 6px;
    font-size: 12px;
    opacity: 0.72;
}

.entity-detail-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.entity-detail-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

.entity-detail-icon-btn:hover {
    background: rgba(255, 255, 255, 0.94);
}

.entity-detail-icon-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.entity-detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.entity-detail-meta-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.03);
}

.entity-detail-meta-label {
    font-size: 11px;
    opacity: 0.65;
    margin-bottom: 4px;
}

.entity-detail-meta-value {
    font-size: 14px;
    font-weight: 600;
}

.entity-detail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.entity-detail-field {
    display: grid;
    gap: 6px;
}

.entity-detail-field--wide,
.entity-detail-field--full {
    grid-column: 1 / -1;
}

.entity-detail-field-label {
    font-size: 12px;
    font-weight: 700;
    opacity: 0.82;
}

.entity-detail-textarea {
    min-height: 120px;
    resize: vertical;
}

.entity-detail-field--checkbox {
    align-content: end;
}

.entity-detail-field--checkbox .form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
}

.entity-detail-form [data-entity-detail-input="1"]:disabled {
    opacity: 1;
    background: rgba(0, 0, 0, 0.035);
    color: inherit;
    cursor: default;
}

.entity-detail-state {
    min-height: 16px;
}

body.theme-dunkel .entity-detail-icon-btn,
body.theme-darkblue .entity-detail-icon-btn,
body.theme-darkgreen .entity-detail-icon-btn {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
}

body.theme-dunkel .entity-detail-icon-btn:hover,
body.theme-darkblue .entity-detail-icon-btn:hover,
body.theme-darkgreen .entity-detail-icon-btn:hover {
    background: rgba(255, 255, 255, 0.09);
}

body.theme-dunkel .entity-detail-meta-card,
body.theme-darkblue .entity-detail-meta-card,
body.theme-darkgreen .entity-detail-meta-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

body.theme-dunkel .entity-detail-form [data-entity-detail-input="1"]:disabled,
body.theme-darkblue .entity-detail-form [data-entity-detail-input="1"]:disabled,
body.theme-darkgreen .entity-detail-form [data-entity-detail-input="1"]:disabled {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {

    .entity-detail-meta-grid,
    .entity-detail-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    .entity-detail-hero,
    .entity-detail-modal-header {
        flex-direction: column;
        align-items: stretch;
    }

    .entity-detail-heading {
        font-size: 20px;
    }

    .entity-detail-toolbar {
        justify-content: flex-end;
    }
}

.todo-detail-tab-panel {
    display: none;
    gap: 10px;
}

.todo-detail-tab-panel.is-active {
    display: grid;
}

.todo-detail-type-strip {
    display: flex;
    justify-content: flex-end;
}

.todo-detail-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.08);
}

.todo-detail-type-badge--task {
    background: #d9f4df;
    color: #185b2d;
}

.todo-detail-type-badge--spontan {
    background: #ffe8bd;
    color: #7a4a00;
}

.todo-detail-type-badge--project {
    background: #d8e7ff;
    color: #194c8a;
}

body.theme-dunkel .todo-detail-type-badge,
body.theme-darkblue .todo-detail-type-badge,
body.theme-darkgreen .todo-detail-type-badge {
    color: #111;
}

.form-row.todo-detail-form-row--stacked {
    grid-template-columns: 1fr;
    align-items: stretch;
}

.form-row.todo-detail-form-row--stacked .form-label {
    margin-bottom: 2px;
}

.todo-detail-info-row {
    gap: 6px;
}

.todo-detail-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.todo-detail-info-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.todo-detail-info-card--compact {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 12px;
}

body.theme-dunkel .todo-detail-info-card,
body.theme-darkblue .todo-detail-info-card,
body.theme-darkgreen .todo-detail-info-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

@media (max-width: 640px) {
    .todo-detail-overview-grid {
        grid-template-columns: 1fr;
    }
}

.todo-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.todo-detail-visibility-control {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.todo-convert-shell {
    display: grid;
    gap: 16px;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.96)),
        radial-gradient(circle at top right, rgba(255, 214, 102, 0.18), transparent 42%);
}

.todo-convert-header-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.todo-convert-header-copy {
    display: grid;
    gap: 2px;
}

.todo-convert-header-field {
    display: grid;
    gap: 8px;
}

.todo-convert-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.todo-convert-subtitle {
    margin-top: 4px;
    max-width: 58ch;
}

.todo-convert-target-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
}

.todo-convert-target-option {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.todo-convert-target-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.todo-convert-target-option span {
    display: block;
    min-width: 132px;
    padding: 10px 14px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.78);
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.todo-convert-target-option input:checked+span {
    background: #fff;
    color: #14213d;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.todo-convert-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.todo-convert-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.todo-convert-card--wide {
    grid-column: 1 / -1;
}

.todo-convert-card--toggle {
    align-content: space-between;
}

.todo-convert-card--accent {
    background: linear-gradient(135deg, rgba(226, 244, 255, 0.96), rgba(255, 255, 255, 0.94));
    border-color: rgba(56, 189, 248, 0.2);
}

.todo-convert-card-title {
    font-size: 14px;
    font-weight: 700;
}

.todo-convert-card-note {
    margin-top: 2px;
}

.todo-convert-textarea {
    min-height: 112px;
    resize: vertical;
}

.todo-convert-textarea--compact {
    min-height: 92px;
}

.todo-convert-actions {
    padding: 0;
    border-top: 0;
}

.todo-convert-submit {
    min-width: 180px;
    border-radius: 12px;
    padding-inline: 18px;
    font-weight: 700;
}

body.theme-dunkel .todo-convert-shell,
body.theme-darkblue .todo-convert-shell,
body.theme-darkgreen .todo-convert-shell {
    border-color: rgba(255, 255, 255, 0.1);
    background:
        linear-gradient(180deg, rgba(37, 37, 37, 0.94), rgba(30, 30, 30, 0.98)),
        radial-gradient(circle at top right, rgba(255, 214, 102, 0.14), transparent 42%);
}

body.theme-dunkel .todo-convert-header-card,
body.theme-darkblue .todo-convert-header-card,
body.theme-darkgreen .todo-convert-header-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.theme-dunkel .todo-convert-target-switch,
body.theme-darkblue .todo-convert-target-switch,
body.theme-darkgreen .todo-convert-target-switch {
    background: rgba(255, 255, 255, 0.08);
}

body.theme-dunkel .todo-convert-target-option span,
body.theme-darkblue .todo-convert-target-option span,
body.theme-darkgreen .todo-convert-target-option span {
    color: rgba(255, 255, 255, 0.78);
}

body.theme-dunkel .todo-convert-target-option input:checked+span,
body.theme-darkblue .todo-convert-target-option input:checked+span,
body.theme-darkgreen .todo-convert-target-option input:checked+span {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: none;
}

body.theme-dunkel .todo-convert-card,
body.theme-darkblue .todo-convert-card,
body.theme-darkgreen .todo-convert-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

body.theme-dunkel .todo-convert-card--accent,
body.theme-darkblue .todo-convert-card--accent,
body.theme-darkgreen .todo-convert-card--accent {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(255, 255, 255, 0.05));
    border-color: rgba(56, 189, 248, 0.18);
}

.dashboard-target-highlight {
    animation: dashboardTargetPulse 2.2s ease;
}

@keyframes dashboardTargetPulse {
    0% {
        background-color: rgba(255, 214, 102, 0);
        box-shadow: none;
    }

    20% {
        background-color: rgba(255, 214, 102, 0.32);
        box-shadow: inset 0 0 0 1px rgba(179, 120, 0, 0.25);
    }

    100% {
        background-color: rgba(255, 214, 102, 0);
        box-shadow: none;
    }
}

.todo-detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.02);
}

body.theme-dunkel .todo-detail-action,
body.theme-darkblue .todo-detail-action,
body.theme-darkgreen .todo-detail-action {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.todo-detail-notes-section {
    display: grid;
    gap: 12px;
}

.todo-detail-note-list {
    max-height: 260px;
    overflow: auto;
}

.todo-detail-notes-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.todo-detail-notes-table th,
.todo-detail-notes-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    text-align: left;
    vertical-align: top;
}

.todo-detail-notes-table th {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    font-size: 12px;
}

body.theme-dunkel .todo-detail-notes-table th,
body.theme-darkblue .todo-detail-notes-table th,
body.theme-darkgreen .todo-detail-notes-table th {
    background: #2b2b2b;
}

body.theme-dunkel .todo-detail-notes-table th,
body.theme-dunkel .todo-detail-notes-table td,
body.theme-darkblue .todo-detail-notes-table th,
body.theme-darkblue .todo-detail-notes-table td,
body.theme-darkgreen .todo-detail-notes-table th,
body.theme-darkgreen .todo-detail-notes-table td {
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

.todo-detail-notes-table th:first-child,
.todo-detail-notes-table td:first-child {
    width: 42px;
    text-align: center;
}

.todo-detail-notes-table th:nth-child(2),
.todo-detail-notes-table td:nth-child(2) {
    width: 180px;
}

.todo-detail-notes-table th:last-child,
.todo-detail-notes-table td:last-child {
    width: 90px;
}

.todo-note-text-cell {
    white-space: pre-wrap;
    word-break: break-word;
}

.todo-note-meta {
    font-size: 12px;
    opacity: 0.75;
}

.todo-note-flag-col,
.todo-note-flag-cell {
    text-align: center;
    white-space: nowrap;
}

.todo-note-flag-empty {
    display: inline-block;
    width: 1px;
}

.todo-note-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.todo-note-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.02);
    padding: 0;
}

body.theme-dunkel .todo-note-action,
body.theme-darkblue .todo-note-action,
body.theme-darkgreen .todo-note-action {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
}

.todo-detail-note-editor {
    display: grid;
    gap: 10px;
}

.todo-detail-embedded-form {
    display: grid;
    gap: 10px;
}

.todo-detail-tab-actions {
    padding-right: 0;
    padding-left: 0;
}

.todo-detail-note-actions {
    padding: 0;
    border-top: 0;
}

body.theme-dunkel .todo-detail-note-actions,
body.theme-darkblue .todo-detail-note-actions,
body.theme-darkgreen .todo-detail-note-actions {
    border-top: 0;
}

@media (max-width: 720px) {

    .overview-body--todos .todo-cols,
    .overview-body--todos #todos-list .todo-row {
        grid-template-columns: 18px 1fr;
    }

    .overview-body--todos .todo-date,
    .overview-body--todos .todo-hours,
    .overview-body--todos .todo-header .todo-date,
    .overview-body--todos .todo-header .todo-hours {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .todo-convert-header {
        display: grid;
        grid-template-columns: 1fr;
    }

    .todo-convert-target-switch {
        width: 100%;
    }

    .todo-convert-target-option span {
        min-width: 0;
    }

    .todo-convert-grid {
        grid-template-columns: 1fr;
    }

    .todo-convert-card,
    .todo-convert-card--wide {
        grid-column: auto;
    }

    .todo-convert-submit {
        width: 100%;
    }

    .todo-detail-notes-table,
    .todo-detail-notes-table thead,
    .todo-detail-notes-table tbody,
    .todo-detail-notes-table tr,
    .todo-detail-notes-table th,
    .todo-detail-notes-table td {
        display: block;
    }

    .todo-detail-notes-table thead {
        display: none;
    }

    .todo-detail-notes-table tr {
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 8px 0;
    }

    body.theme-dunkel .todo-detail-notes-table tr,
    body.theme-darkblue .todo-detail-notes-table tr,
    body.theme-darkgreen .todo-detail-notes-table tr {
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }

    .todo-detail-notes-table th:first-child,
    .todo-detail-notes-table td:first-child,
    .todo-detail-notes-table th:nth-child(2),
    .todo-detail-notes-table td:nth-child(2),
    .todo-detail-notes-table th:last-child,
    .todo-detail-notes-table td:last-child {
        width: auto;
    }

    .todo-detail-notes-table th,
    .todo-detail-notes-table td {
        border-bottom: 0;
        padding: 4px 0;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 8px;
}

.form-row .form-label {
    font-weight: 600;
}

.form-row input[type="time"],
.form-row select,
.form-row input[type="text"] {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: transparent;
    color: inherit;
}

body.theme-dunkel .form-row input,
body.theme-darkblue .form-row input,
body.theme-darkgreen .form-row input,
body.theme-dunkel .form-row select,
body.theme-darkblue .form-row select,
body.theme-darkgreen .form-row select {
    border-color: rgba(255, 255, 255, 0.25);
}

/* Dashboard widgets: Variante A (Drag&Drop Reorder) */
.dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}

.dashboard-widgets>* {
    min-width: 0;
}

.dashboard-widget {
    min-width: 0;
}

.dashboard-widget--half {
    flex: 1 1 520px;
}

.dashboard-widget--full {
    flex: 1 1 100%;
}

.dashboard-widget-handle {
    cursor: grab;
    user-select: none;
}

.dashboard-widget.is-dragging {
    opacity: 0.85;
}

@media (max-width: 900px) {
    .dashboard-widget--half {
        flex: 1 1 100%;
    }
}

.overview-todo-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.overview-list-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    margin: 0 0 4px 0;
    padding: 0 2px 6px 0;
}

.spontan-input-bar {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px 0 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
}

body.theme-dunkel .spontan-input-bar,
body.theme-darkblue .spontan-input-bar,
body.theme-darkgreen .spontan-input-bar {
    background: rgba(0, 0, 0, 0.25);
    border-top-color: rgba(255, 255, 255, 0.25);
}

body.theme-dunkel .overview-list-scroll,
body.theme-darkblue .overview-list-scroll,
body.theme-darkgreen .overview-list-scroll {
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

body.theme-dunkel .spontan-input-bar,
body.theme-darkblue .spontan-input-bar,
body.theme-darkgreen .spontan-input-bar {
    background: transparent;
}

.overview-section {
    margin-bottom: 6px;
}

.overview-section h6 {
    margin: 0 0 2px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .7;
}

.overview-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.overview-list li {
    padding: 2px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    font-size: 11px;
}

body.theme-dunkel .overview-list li,
body.theme-darkblue .overview-list li,
body.theme-darkgreen .overview-list li {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

/* Table layout panel styles */
.tl-listbox {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.70);
    width: 100%;
    box-sizing: border-box;
}

select.tl-listbox {
    padding: 6px;
}

body.theme-dunkel .tl-listbox,
body.theme-darkblue .tl-listbox,
body.theme-darkgreen .tl-listbox {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.18);
}

.tl-width-editor {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tl-width-label {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

.tl-width-hint {
    font-size: 11px;
    opacity: 0.65;
    line-height: 1.2;
}

.tl-width-current {
    font-size: 11px;
    opacity: 0.75;
    line-height: 1.2;
}

.tl-width {
    width: 100%;
}

/* User bearbeiten: Tabellenlayout ohne Bootstrap */
.user-edit-tablelayout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 1180px) {
    .user-edit-tablelayout-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.user-edit-tablelayout-box {
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
    overflow: hidden;
}

body.theme-dunkel .user-edit-tablelayout-box,
body.theme-darkblue .user-edit-tablelayout-box,
body.theme-darkgreen .user-edit-tablelayout-box {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.20);
}

.user-edit-tablelayout-box__header {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(0, 0, 0, 0.03);
}

body.theme-dunkel .user-edit-tablelayout-box__header,
body.theme-darkblue .user-edit-tablelayout-box__header,
body.theme-darkgreen .user-edit-tablelayout-box__header {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

.user-edit-tablelayout-box__body {
    padding: 12px;
}

/* Tabellenlayout: kompakte 1-Reihen-UI */
.tl-layout {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 52px minmax(240px, 1fr);
    gap: 12px;
    align-items: start;
}

.tl-layout>* {
    min-width: 0;
}

@media (max-width: 720px) {
    .tl-layout {
        grid-template-columns: 1fr;
    }

    .tl-transfer {
        flex-direction: row;
        justify-content: flex-start;
    }
}

.tl-available-wrap .tl-title,
.tl-selected-wrap .tl-title {
    font-size: 12px;
    opacity: 0.8;
    margin: 0 0 6px;
}

.tl-available,
.tl-selected {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.tl-transfer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.tl-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 6px;
}

.tl-selected {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tl-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tl-row.is-dragging {
    opacity: 0.65;
}

/* Tabellenlayout: Buttons und Text um 30% kleiner */
.tl-panel .btn,
.tl-inline .btn {
    font-size: 70%;
    padding: calc(var(--btn-sm-padding-y, 0.25rem) * 0.7) calc(var(--btn-sm-padding-x, 0.5rem) * 0.7);
}

.tl-listbox .tl-row {
    font-size: 70%;
}

.ua-title,
.task-open-page .open-hero h1,
.project-open-page .open-hero h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.task-open-page .open-section-title,
.project-open-page .open-section-title,
.open-section-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.pmh3 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

.pmh4 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    font-weight: 700;
    color: #000;
}

.pmhtext1 {
    font-family: "Times New Roman", Times, serif;
    font-size: 12px;
    font-weight: 400;
    text-decoration: none;
}

.pmhtext3 {
    font-family: "Times New Roman", Times, serif;
    font-size: 10px;
    font-weight: 400;
    text-decoration: none;
}

.pmhtext4 {
    font-family: "Times New Roman", Times, serif;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
}

.pmhtext5 {
    font-family: "Times New Roman", Times, serif;
    font-size: 8px;
    font-weight: 700;
    text-decoration: none;
}

.pmhmeta1 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 9px;
    font-weight: 400;
    text-decoration: none;
}

.pmhmeta2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 8px;
    font-weight: 400;
    text-decoration: none;
}

.pmh-color-white {
    color: #fff;
}

.pmh-opacity-90 {
    opacity: 0.9;
}

.pmh-opacity-80 {
    opacity: 0.8;
}

.pmh-opacity-55 {
    opacity: 0.55;
}

.pmh-no-underline {
    text-decoration: none;
}

.line-height-1 {
    line-height: 1;
}

/* Dashboard open views (inprogress, unaccepted, overdue, unassigned) */
.open-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.10);
}

body.theme-dunkel .open-table,
body.theme-darkblue .open-table,
body.theme-darkgreen .open-table {
    border-color: rgba(255, 255, 255, 0.14);
}

.open-table th,
.open-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    vertical-align: middle;
}

body.theme-dunkel .open-table th,
body.theme-darkblue .open-table th,
body.theme-darkgreen .open-table th,
body.theme-dunkel .open-table td,
body.theme-darkblue .open-table td,
body.theme-darkgreen .open-table td {
    border-bottom-color: rgba(255, 255, 255, 0.10);
}

.open-table tbody tr:last-child td {
    border-bottom: 0;
}

.lupe-btn {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    opacity: 0.75;
}

.lupe-btn:hover {
    opacity: 1;
}

.row-accepted td {
    opacity: 0.4;
    text-decoration: line-through;
}

.save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0.8;
}

.save-btn:hover {
    opacity: 1;
}

body.theme-dunkel .save-btn,
body.theme-darkblue .save-btn,
body.theme-darkgreen .save-btn {
    border-color: rgba(255, 255, 255, 0.22);
    color: inherit;
}

.save-btn.is-saved {
    opacity: 0.6;
}

.assigned-user-label {
    font-weight: inherit;
    font-size: inherit;
}

.row-fade-out-fast {
    transition: opacity 0.4s;
    opacity: 0;
}

.row-fade-out {
    transition: opacity 0.8s;
    opacity: 0;
}

/* Utility classes for template cleanup */
.container-max-960 {
    max-width: 960px;
}

.container-max-1100 {
    max-width: 1100px;
}

.container-max-860 {
    max-width: 860px;
}

.container-max-900 {
    max-width: 900px;
}

.privacy-toggle--legacy .privacy-toggle__input:checked+.privacy-toggle__track .privacy-toggle__thumb {
    transform: translateX(22px);
}

.cell-max-420 {
    max-width: 420px;
}

.cell-max-220 {
    max-width: 220px;
}

.cell-max-480 {
    max-width: 480px;
}

.legacy-col-w-44 {
    width: 44px;
}

.legacy-col-w-80 {
    width: 80px;
}

.legacy-col-w-110 {
    width: 110px;
}

.legacy-col-w-140 {
    width: 140px;
}

.legacy-col-18p {
    width: 18%;
}

.legacy-col-14p {
    width: 14%;
}

.legacy-col-12p {
    width: 12%;
}

.legacy-col-10p {
    width: 10%;
}

.legacy-col-9p {
    width: 9%;
}

.legacy-col-8p {
    width: 8%;
}

.legacy-pplus-btn {
    padding: 2px 6px;
    vertical-align: baseline;
}

.chat-peer-select {
    width: auto;
    min-width: 140px;
}

.chat-inbox-box {
    height: 200px;
    overflow: auto;
}

.chat-messages-box {
    height: 160px;
    overflow: auto;
    background: #fff;
}

.progress-thin {
    height: 6px;
}

.task-desc-min-220 {
    min-width: 220px;
}

.legacy-hidden-frame {
    display: none;
    width: 0;
    height: 0;
}

.chat-inbox-item-clickable {
    cursor: pointer;
}

.white-space-pre-wrap {
    white-space: pre-wrap;
}

.btn-unstyled-icon {
    background: none;
    border: 0;
    padding: 0;
}

.task-open-actions-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
}

.task-open-back-link {
    display: inline-flex;
    align-items: center;
}

.open-section-title--reset {
    margin: 0;
}

.dashboard-row-hidden {
    display: none;
}

.example-wrapper {
    margin: 1em auto;
    max-width: 800px;
    width: 95%;
    font: 18px/1.5 sans-serif;
}

.example-wrapper code {
    background: #f5f5f5;
    padding: 2px 6px;
}

.home-nav-spaced {
    margin-bottom: 2em;
}

.admin-dept-back-wrap {
    margin: .5rem 0 1rem 0;
}

.admin-dept-card {
    margin-bottom: 1rem;
}

.admin-dept-title-reset {
    margin-top: 0;
}

.admin-dept-form-gap {
    row-gap: .5rem;
}

.admin-dept-min-220 {
    min-width: 220px;
}

.admin-dept-col-id {
    width: 90px;
}

.admin-dept-col-action {
    width: 120px;
}

.admin-dept-cell-nowrap {
    white-space: nowrap;
}

.back-wrap-sm {
    margin: .5rem 0 1rem 0;
}

.cell-nowrap {
    white-space: nowrap;
}

.user-preview-card {
    margin-bottom: 1rem;
}

.card-title-mt-0 {
    margin-top: 0;
}

.flex-gap-1rem {
    gap: 1rem;
}

.mt-05rem {
    margin-top: .5rem;
}

.table-wrap-top {
    margin-top: .75rem;
    overflow: auto;
}

.archive-frame {
    width: 100%;
    box-sizing: border-box;
    padding: 0 12px 12px;
}

.archive-table {
    min-width: 100%;
    border-collapse: collapse;
}

.archive-table-bordered,
.archive-table-bordered th,
.archive-table-bordered td {
    border: 1px solid #cfcfcf;
}

.cell-max-520 {
    max-width: 520px;
}

/* User admin page */
.ua-top {
    margin-bottom: 1rem;
}

.ua-hero {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.ua-col {
    flex: 1;
    min-width: 340px;
}

.ua-panel {
    border-radius: 18px;
    border: 1px solid rgba(0, 0, 0, 0.10);
    background: rgba(0, 0, 0, 0.02);
    padding: 14px 16px;
}

body.theme-dunkel .ua-panel,
body.theme-darkblue .ua-panel,
body.theme-darkgreen .ua-panel {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.ua-title {
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 10px 0;
    letter-spacing: .2px;
}

.ua-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

@media (max-width: 900px) {
    .ua-grid {
        grid-template-columns: 1fr;
    }
}

.ua-field label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .8px;
    opacity: .75;
    margin: 0 0 6px 0;
}

.ua-field .form-control {
    border-radius: 12px;
}

.ua-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.ua-actions .btn {
    border-radius: 999px;
}

.ua-save-icon-btn {
    background: none;
    border: none;
    padding: 0;
}

.ua-subtitle {
    font-weight: 700;
    font-size: 14px;
    margin: 14px 0 8px 0;
    opacity: .9;
}

.ua-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.ua-spacer-12 {
    height: 12px;
}

.ua-actions-top {
    margin-top: 10px;
}

.ua-overflow-auto {
    overflow: auto;
}

.ua-table-m0 {
    margin: 0;
}

.ua-password-wrap {
    min-width: 200px;
}

.ua-password-input {
    min-width: 140px;
}

.ua-matrix-panel {
    margin-top: 14px;
}

.ua-matrix-intro {
    font-size: 13px;
    line-height: 1.45;
    opacity: .82;
    margin-bottom: 12px;
}

.ua-role-summary-wrap {
    overflow: auto;
}

.ua-role-summary,
.ua-permission-table {
    margin: 0;
}

.ua-role-summary th,
.ua-role-summary td,
.ua-permission-table th,
.ua-permission-table td {
    vertical-align: top;
}

.ua-role-name,
.ua-permission-name {
    font-weight: 700;
}

.ua-role-key,
.ua-permission-key {
    font-size: 11px;
    opacity: .68;
    margin-top: 2px;
    font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
}

.ua-role-note {
    font-size: 12px;
    opacity: .75;
    margin-top: 4px;
}

.ua-warning-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 6px;
}

.ua-field-full {
    grid-column: 1 / -1;
}

.ua-warning-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.12);
    border: 1px solid rgba(255, 193, 7, 0.28);
}

.ua-permission-group+.ua-permission-group {
    margin-top: 12px;
}

.ua-grant-cell {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.ua-source-list {
    font-size: 12px;
    line-height: 1.35;
    min-width: 220px;
}

.ua-role-editor-panel {
    margin-top: 14px;
}

.ua-role-create-form {
    margin-bottom: 18px;
}

.ua-role-matrix-wrap {
    overflow: auto;
}

.ua-role-matrix-table {
    margin: 0;
    min-width: 1040px;
}

.ua-role-matrix-table th,
.ua-role-matrix-table td {
    vertical-align: top;
}

.ua-role-matrix-sidehead {
    min-width: 280px;
    width: 280px;
    background: rgba(0, 0, 0, 0.03);
}

.ua-role-matrix-rolehead,
.ua-role-matrix-metahead {
    min-width: 260px;
    width: 260px;
}

.ua-role-column-head {
    display: grid;
    gap: 4px;
}

.ua-role-column-meta {
    display: grid;
    gap: 10px;
}

.ua-role-meta-field {
    display: grid;
    gap: 4px;
    font-size: 12px;
}

.ua-role-meta-field span {
    font-weight: 700;
    opacity: .8;
}

.ua-role-meta-switch {
    justify-items: start;
}

.ua-role-meta-switch input {
    margin-top: 2px;
}

.ua-role-group-row th {
    background: rgba(13, 110, 253, 0.08);
    font-weight: 700;
    letter-spacing: .02em;
}

.ua-role-matrix-permission {
    min-width: 280px;
}

.ua-role-matrix-cell {
    text-align: center;
    vertical-align: middle;
}

.ua-role-matrix-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    width: 100%;
}

.ua-role-matrix-checkbox input {
    transform: scale(1.15);
}

.ua-role-editor-list {
    display: grid;
    gap: 14px;
}

.ua-role-editor-card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.38);
}

.ua-role-editor-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 10px 12px;
    align-items: end;
}

.ua-role-active-field {
    align-self: center;
}

.ua-role-editor-note {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin: 10px 0 4px;
    font-size: 12px;
    opacity: .8;
}

.ua-role-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.ua-role-permission-item {
    display: grid;
    gap: 4px;
    align-content: start;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.5);
}

.ua-role-permission-item input {
    margin: 0 0 2px;
}

.ua-role-permission-name {
    font-weight: 700;
}

.ua-role-permission-desc {
    font-size: 12px;
    line-height: 1.35;
    opacity: .78;
}

body.theme-dunkel .ua-warning-item,
body.theme-darkblue .ua-warning-item,
body.theme-darkgreen .ua-warning-item {
    background: rgba(255, 193, 7, 0.10);
    border-color: rgba(255, 214, 102, 0.28);
}

body.theme-dunkel .ua-role-editor-card,
body.theme-darkblue .ua-role-editor-card,
body.theme-darkgreen .ua-role-editor-card {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
}

body.theme-dunkel .ua-role-matrix-sidehead,
body.theme-darkblue .ua-role-matrix-sidehead,
body.theme-darkgreen .ua-role-matrix-sidehead {
    background: rgba(255, 255, 255, 0.06);
}

body.theme-dunkel .ua-role-group-row th,
body.theme-darkblue .ua-role-group-row th,
body.theme-darkgreen .ua-role-group-row th {
    background: rgba(110, 168, 254, 0.12);
}

body.theme-dunkel .ua-role-permission-item,
body.theme-darkblue .ua-role-permission-item,
body.theme-darkgreen .ua-role-permission-item {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 980px) {
    .ua-role-editor-meta {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 980px) {

    .ua-role-matrix-rolehead,
    .ua-role-matrix-metahead {
        min-width: 220px;
        width: 220px;
    }
}

@media (max-width: 680px) {
    .ua-role-editor-meta {
        grid-template-columns: 1fr;
    }
}

.user-field.changed {
    border-color: #0d6efd;
    box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .25);
}

.save-btn[disabled] img {
    filter: grayscale(100%);
    opacity: .5;
}

/* Stundenzettel */
.stz-table {
    border-collapse: collapse;
    width: 100%;
}

.stz-table th,
.stz-table td {
    border: 1px solid rgba(0, 0, 0, 0.35);
    padding: 6px 8px;
}

body.theme-dunkel .stz-table th,
body.theme-dunkel .stz-table td,
body.theme-darkblue .stz-table th,
body.theme-darkblue .stz-table td,
body.theme-darkgreen .stz-table th,
body.theme-darkgreen .stz-table td {
    border-color: rgba(255, 255, 255, 0.25);
}

.stz-table th {
    text-align: left;
}

.stz-icon-btn {
    position: relative;
}

.stz-col-day {
    width: 130px;
}

.stz-col-actions {
    width: 40px;
}

.stz-col-hours {
    width: 90px;
}

.stz-actions-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.stz-action-link {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.stz-inline-form {
    display: inline;
    margin: 0;
}

.stz-icon-plain-btn {
    border: 0;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Verbesserung pages */
.verb-card {
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: visible;
}

body.theme-dunkel .verb-card,
body.theme-darkblue .verb-card,
body.theme-darkgreen .verb-card {
    background: rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.verb-field {
    display: grid;
    gap: 4px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 6px 8px;
    height: auto;
}

body.theme-dunkel .verb-field,
body.theme-darkblue .verb-field,
body.theme-darkgreen .verb-field {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.verb-label {
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.7;
}

.verb-value {
    font-size: 13px;
    line-height: 1.2;
}

.verb-actions {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.verb-list {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 2px;
}

.verb-row {
    display: grid;
    grid-template-columns: 140px 220px 1fr 120px;
    gap: 8px;
    align-items: stretch;
    min-width: 860px;
}

.verb-form textarea {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
}

.verb-form .btn {
    border-radius: 10px;
}

.verb-meta {
    display: grid;
    gap: 6px;
}

/* Task open detail page */
.task-open-page {
    --task-open-bg: #f3f2f6;
    --task-open-ink: #1b1b20;
    --task-open-muted: #5f6470;
    --task-open-accent: #3c6de6;
    --task-open-card: #ffffff;
    --task-open-line: #dfe3ee;
    --task-open-shadow: 0 16px 44px rgba(18, 22, 35, 0.12);
    --task-open-radius: 18px;
    background: radial-gradient(1200px 420px at 5% -10%, #e8f1ff 0%, transparent 60%), radial-gradient(1000px 380px at 100% -20%, #ffe6ef 0%, transparent 55%), var(--task-open-bg);
    color: var(--task-open-ink);
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    padding: 28px 24px 48px;
}

.task-open-page .open-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    animation: taskOpenFadeUp 420ms ease-out;
}

.task-open-page .open-hero h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: clamp(26px, 3vw, 36px);
    margin: 0 0 6px 0;
}

.task-open-page .open-hero .sub {
    color: var(--task-open-muted);
    font-size: 14px;
}

.task-open-page .open-pill {
    background: var(--task-open-card);
    border: 1px solid var(--task-open-line);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--task-open-accent);
    box-shadow: var(--task-open-shadow);
    white-space: nowrap;
}

.task-open-page .open-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    animation: taskOpenFadeUp 520ms ease-out;
}

.task-open-page .open-card {
    background: var(--task-open-card);
    border: 1px solid var(--task-open-line);
    border-radius: var(--task-open-radius);
    padding: 14px 16px;
    box-shadow: var(--task-open-shadow);
}

.task-open-page .open-label {
    color: var(--task-open-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.task-open-page .open-value {
    font-weight: 600;
    font-size: 15px;
    word-break: break-word;
}

.task-open-page .open-section-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.task-open-page .open-table {
    background: var(--task-open-card);
    border: 1px solid var(--task-open-line);
    border-radius: var(--task-open-radius);
    overflow: hidden;
    box-shadow: var(--task-open-shadow);
    animation: taskOpenFadeUp 620ms ease-out;
}

.task-open-page .open-table table {
    margin: 0;
    width: 100%;
}

.task-open-page .open-table thead th {
    background: transparent;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.task-open-page .open-table tbody td {
    vertical-align: middle;
}

.task-open-page .open-table thead th+th,
.task-open-page .open-table tbody td+td,
.task-open-page .open-table tbody tr+tr td,
.project-open-page .open-table thead th+th,
.project-open-page .open-table tbody td+td,
.project-open-page .open-table tbody tr+tr td {
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.task-open-page .open-table tbody tr+tr td,
.project-open-page .open-table tbody tr+tr td {
    border-top: 1px dashed rgba(0, 0, 0, 0.06);
}

body.theme-dunkel .task-open-page .open-table thead th+th,
body.theme-darkblue .task-open-page .open-table thead th+th,
body.theme-darkgreen .task-open-page .open-table thead th+th,
body.theme-dunkel .task-open-page .open-table tbody td+td,
body.theme-darkblue .task-open-page .open-table tbody td+td,
body.theme-darkgreen .task-open-page .open-table tbody td+td,
body.theme-dunkel .project-open-page .open-table thead th+th,
body.theme-darkblue .project-open-page .open-table thead th+th,
body.theme-darkgreen .project-open-page .open-table thead th+th,
body.theme-dunkel .project-open-page .open-table tbody td+td,
body.theme-darkblue .project-open-page .open-table tbody td+td,
body.theme-darkgreen .project-open-page .open-table tbody td+td {
    border-left-color: rgba(255, 255, 255, 0.12);
}

body.theme-dunkel .task-open-page .open-table tbody tr+tr td,
body.theme-darkblue .task-open-page .open-table tbody tr+tr td,
body.theme-darkgreen .task-open-page .open-table tbody tr+tr td,
body.theme-dunkel .project-open-page .open-table tbody tr+tr td,
body.theme-darkblue .project-open-page .open-table tbody tr+tr td,
body.theme-darkgreen .project-open-page .open-table tbody tr+tr td {
    border-top-color: rgba(255, 255, 255, 0.12);
}

@keyframes taskOpenFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Project open detail page */
.project-open-page {
    --project-open-bg: #f6f4ef;
    --project-open-ink: #1f1e1b;
    --project-open-muted: #6c675f;
    --project-open-accent: #e66a3c;
    --project-open-card: #ffffff;
    --project-open-line: #e1dad1;
    --project-open-shadow: 0 14px 40px rgba(30, 28, 24, 0.12);
    --project-open-radius: 18px;
    background: radial-gradient(1200px 400px at 10% -10%, #ffe8d6 0%, transparent 60%), radial-gradient(1200px 500px at 100% -20%, #d8f0ff 0%, transparent 55%), var(--project-open-bg);
    color: var(--project-open-ink);
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    padding: 28px 24px 48px;
}

.project-open-page .open-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    animation: projectOpenFadeUp 420ms ease-out;
}

.project-open-page .open-hero h1 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 700;
    font-size: clamp(28px, 3.2vw, 40px);
    margin: 0 0 6px 0;
    letter-spacing: 0.2px;
}

.project-open-page .open-hero .sub {
    color: var(--project-open-muted);
    font-size: 14px;
}

.project-open-page .open-pill {
    background: var(--project-open-card);
    border: 1px solid var(--project-open-line);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 600;
    color: var(--project-open-accent);
    box-shadow: var(--project-open-shadow);
    white-space: nowrap;
}

.project-open-page .open-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
    animation: projectOpenFadeUp 520ms ease-out;
}

.project-open-page .open-card {
    background: var(--project-open-card);
    border: 1px solid var(--project-open-line);
    border-radius: var(--project-open-radius);
    padding: 14px 16px;
    box-shadow: var(--project-open-shadow);
}

.project-open-page .open-label {
    color: var(--project-open-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.project-open-page .open-value {
    font-weight: 600;
    font-size: 15px;
    word-break: break-word;
}

.project-open-page .open-desc {
    background: var(--project-open-card);
    border: 1px solid var(--project-open-line);
    border-radius: var(--project-open-radius);
    padding: 16px 18px;
    box-shadow: var(--project-open-shadow);
    margin-bottom: 22px;
    animation: projectOpenFadeUp 620ms ease-out;
}

.project-open-page .open-section-title {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 20px;
    margin: 0 0 10px 0;
}

.project-open-page .open-table {
    background: var(--project-open-card);
    border: 1px solid var(--project-open-line);
    border-radius: var(--project-open-radius);
    overflow: hidden;
    box-shadow: var(--project-open-shadow);
    animation: projectOpenFadeUp 700ms ease-out;
}

.project-open-page .open-table table {
    margin: 0;
    width: 100%;
}

.project-open-page .open-table thead th {
    background: transparent;
    color: inherit;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

.project-open-page .open-table tbody td {
    vertical-align: middle;
}

@keyframes projectOpenFadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.open-back-icon {
    --icon-size: 50.4px;
}

@media (max-width: 900px) {

    .task-open-page .open-hero,
    .project-open-page .open-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-open-page .open-pill,
    .project-open-page .open-pill {
        align-self: flex-start;
    }
}