@import url("ui/tokens.css");
@import url("ui/base.css");
@import url("ui/sections.css");
@import url("ui/forms.css");
@import url("ui/tables.css");
@import url("ui/feedback.css");

.disable-link{
	pointer-events: none;
	cursor: default;
	opacity:0.5;
}


/* AP2 – anwendungsspezifische Komponenten und Seiten */
.today-head,
.wrap {
    width: min(100%, 600px);
    margin: 0 auto;
}

.today-wrap{
    margin-top:80px;
}

.today-head {
    display: flex;
    align-items: center;
    justify-content: end;
    gap: 12px;
    padding: 14px 16px 6px;
}

.today-title {
    display: flex;
    gap: 8px;
    font-size: 21px;
    margin-bottom: 5px;
    justify-content: space-between;
}

.today-head nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}

.wrap {
    padding: 10px 16px 26px;
}

.time-card {
    padding: 12px 16px 14px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    /*! border-radius: 12px; */
    box-shadow: var(--shadow);
}

.control-buttons {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    min-height: 104px;
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--line);
}

.control-buttons > input[type="hidden"] {
    display: none;
}

.control-item {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 82px;
    transition: transform 0.12s ease;
}

.control-item.dragging {
    z-index: 5;
    transform: scale(1.08);
    opacity: 0.75;
}

.btn.round {
    width: 76px;
    height: 76px;


}

.drag-handle {
    width: 34px;
    height: 18px;
    padding: 0;
    color: #737782;
    font-size: 16px;
    line-height: 16px;
    background: transparent;
    border-radius: 6px;
    touch-action: none;
    user-select: none;
}

.drag-handle:hover,
.drag-handle:focus-visible {
    color: var(--purple);
    background: var(--purple-soft);
}

.time-label {
    margin: 30px 0 2px;
    color: #4b4f58;
    font-size: 16px;
    font-weight: 750;
}

.timer {
    margin: 0;
    font-size: clamp(48px, 11vw, 72px);
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.05em;
}

.since {
    margin: 4px 0 20px;
    color: #4b4f58;
    font-size: 16px;
}

.time-meta {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
    padding-top: 10px;
    text-align: left;
    font-size: 14px;
    border-top: 1px solid var(--line);
}

.time-meta b {
    margin-right: 4px;
}

.section-title {
    margin: 20px 0 8px;
    color: #60656d;
    font-size: 17px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.accordion-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    /*! border-radius: 8px; */
}

.today-org-unit-title {
    margin: 0;
    padding: 10px 14px;
    color: var(--text-muted, #60656d);
    font-size: 14px;
    font-weight: 700;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--table-head-background, #f1f3f4);
}

.today-org-unit-title:first-child {
    border-top: 0;
}

.today-empty-categories {
    margin: 0;
    padding: 16px;
    color: var(--text-muted, #60656d);
}

.cat-group {
    border-bottom: 1px solid var(--line);
}

.cat-group:last-of-type {
    /*border-bottom: 0;
    background-color: #d8d8da;*/
}

.cat-group summary {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: 8px;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    font-size: 16px;
    list-style: none;
    cursor: pointer;
}

.cat-group summary::-webkit-details-marker {
    display: none;
}

.cat-group[open] > summary {
    color: var(--purple);
    background: #fcfaff;
}

.folder,
.cat-icon {
    font-size: 18px;
    line-height: 1;
}

.chev {
    font-size: 22px;
    line-height: 1;
    transition: transform 0.15s ease;
    width: 12px;
}

.cat-group[open] > summary .chev {
    transform: rotate(90deg);
}

.cat-children {
    border-top: 1px solid var(--line);
}

.cat-row {
    position: relative;
    border-bottom: 1px solid var(--line);
}

.cat-row:last-child {
    border-bottom: 0;
}

.cat-row-main {
    border-bottom: 1px solid var(--line);
}

.cat-row-child {
    margin-left: 22px;
    border-left: 2px solid #ece7f5;
}

.cat-row.active {
    background: linear-gradient(90deg, #f8f2ff, #fff);
}

.cat-row.active::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    content: "";
    background: var(--purple);
}

.cat-row-content {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    min-height: 44px;
    padding: 6px 10px;
}

.cat-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}

.cat-text strong {
    overflow: hidden;
    font-size: 15px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cat-text small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
}

.cat-row.active .cat-icon,
.cat-row.active .cat-text strong {
    color: var(--purple);
}

.active-pill {
    padding: 2px 7px;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--purple);
    border-radius: 999px;
}

.cat-control-form {
    margin: 0;
}

.cat-control {
    width: 46px;
    height: 46px;


}

.entry-tools {
    display: flex;
    gap: 6px;
    padding: 0 10px 7px 38px;
}

.icon-toggle {
    min-width: 32px;
    height: 28px;


}

.icon-toggle.has-data::after {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 4px;
    vertical-align: 2px;
    content: "";


}

.entry-details-form {
    padding: 0 10px 9px 38px;
}

.entry-detail-panel {
    margin-bottom: 7px;
}

.entry-detail-panel label {
    display: block;
    margin: 0;
}

.entry-detail-panel label > span {
    display: block;
    margin-bottom: 3px;
    color: #5c2b9b;
    font-size: 12px;
    font-weight: 600;
}

.entry-detail-panel input,
.entry-detail-panel textarea {
    width: 100%;
    margin: 0;
    padding: 7px 8px;
    font-size: 14px;
    background: #fff;
    border: 1px solid #cfd2d8;
    border-radius: 6px;
}

.entry-detail-panel textarea {
    min-height: 58px;
    resize: vertical;
}

.expense-fields {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
}

.entry-detail-actions {
    text-align: right;
}

.no-cat-row {
    border-top: 0;
}

.card {
    margin: 0 0 14px;
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}

.auth {
    max-width: 420px;
    margin: 40px auto;
}

label {
    display: block;
    margin: 6px 0;
    text-align: left;
    
}

input,
select,
textarea {
    width: 100%;
    min-height:36px;
    margin-top: 5px;
    padding: 6px 10px;
    font-size: 14px;
    background: var(--input-enabled);
    border: 1px solid #d4d4d8;
}

input[disabled],
select[disabled],
textarea[disabled] {
    background: var(--input-disabled);
}

.is-disabled{opacity:0.5;}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #fff;
    background: #111;
}

.topbar-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(calc(100% - 24px),840px);
    margin: 0 auto;
}

.topbar a {
    color: #fff;
}

.topbar nav {
    display: flex;
    gap: 12px;
}

.wide {
    max-width: 800px;
}

.filter {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: end;
}

.buttonlike {
    display: inline-flex;
    align-items: center;
    justify-content: center;


    /*! border-radius: 9px; */
}

.big-total {
    margin: 0;
    font-size: 38px;
    font-weight: 850;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chips span {
    padding: 6px 10px;
    background: #f4f4f5;
    border-radius: 999px;
}

.table-card {
    overflow-x: auto;
}

.report-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.report-table th,
.report-table td {
    padding: 8px;
    text-align: left;
    vertical-align: middle;
    border-top: 1px solid #eee;
}

.report-table th {
    color: #71717a;
    font-size: 13px;
}

.report-table tr.manual {
    background: #fffbeb;
}

.inline-edit {
    display: grid;
    grid-template-columns: 82px minmax(130px, 1fr) auto;
    gap: 7px;
    align-items: center;
}

.inline-clear {
    margin: 0;
}

.time-input {
    font-weight: 600;
    text-align: center;
}

.note-input {
    padding: 9px;
    font-size: 14px;
}

.filter {
    grid-template-columns: 1fr 1fr auto auto;
}

@media (max-width: 768px) {
    .today-head {
        display: block;
        padding: 12px 10px 4px;
    }

    .today-head nav {
        margin-top: 5px;
    }

    .wrap {
        padding: 7px 8px 20px;
    }

    .time-card {
        padding: 9px 8px 11px;
    }

    .control-buttons {
        gap: 12px;
        min-height: 93px;
    }

    .control-item {
        min-width: 70px;
    }

    .btn.round {
        width: 66px;
        height: 66px;

    }

    .timer {
        font-size: 52px;
    }

    .time-meta {
        grid-template-columns: 1fr 1fr auto;
        gap: 5px 8px;
    }

    .time-meta a {
        grid-column: 1 / -1;
    }

    .cat-row-child {
        margin-left: 13px;
    }

    .cat-row-content {
        grid-template-columns: 18px minmax(0, 1fr) auto;
        gap: 6px;
        padding: 5px 7px;
    }

    .active-pill {
        display: none;
    }

    .cat-control {
        min-width: 52px;

    }

    .entry-tools,
    .entry-details-form {
        padding-left: 31px;
    }

    .expense-fields {
        grid-template-columns: 100px 1fr;
    }

    .inline-edit {
        grid-template-columns: 1fr;
    }

    .report-table {
        min-width: 0;
    }

    .report-table thead {
        display: none;
    }

    .report-table,
    .report-table tbody,
    .report-table tr,
    .report-table td {
        display: block;
        width: 100%;
    }

    .report-table tr {
        padding: 10px 0;
        border-top: 1px solid #ddd;
    }

    .report-table td {
        padding: 5px 0;
        border: 0;
    }

    .report-table td::before {
        display: block;
        color: #71717a;
        font-size: 11px;
        content: attr(data-label);
    }
	.today-title{
		font-size:18px;
	}

}

@media (max-width: 768px) {
    .control-buttons {
        gap: 7px;
    }

    .control-item {
        min-width: 63px;
    }

    .btn.round {
        width: 60px;
        height: 60px;

    }

    .expense-fields {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Hauptsteuerung als Schieberegler
   ========================================================= */

.control-buttons,
.control-item,
.drag-handle,
.active-pill {
    display: none;
}

/* =========================================================
   Hauptsteuerung: ursprünglicher Slider, modernisiert
   ========================================================= */

.main-slider-form {
    margin: 0 0 10px;
}

.main-slider-form > input[type="hidden"] {
    display: none;
}

#slider-container {
    width: 100%;
    padding: 4px 20px 22px;
}

.slider-title {
    margin-bottom: 8px;
    color: #5f636b;
    font-size: 14px;
    font-weight: 750;
}

#slider-feld {
    --slider-field-width: min(300px, calc(100vw - 100px));
    --slider-field-height: 18px;
    --slider-size: 70px;
    --slider-active-size: 80px;
    --slider-marker-size: 42px;
    position: relative;
    width: var(--slider-field-width);
    height: var(--slider-field-height);
    margin: 34px auto 28px;
    background: #d9dce1;
    border: 1px solid #aeb3bb;
    border-radius: 999px;
}

#slider {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--slider-size);
    height: var(--slider-size);
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    background: var(--green);
    border: 4px solid #b6b8bd;
    border-radius: 50%;
    box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.16),
        0 3px 9px rgba(0, 0, 0, 0.16);
    transform: translateY(-50%);
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#slider:active,
#slider.moveSlider {
    width: var(--slider-active-size);
    height: var(--slider-active-size);
    cursor: grabbing;
}

#slider.slider-animate {
    transition: left 0.2s ease,
        width 0.12s ease,
        height 0.12s ease,
        background-color 0.15s ease,
        color 0.15s ease;
}

#slider:focus-visible {
    outline: 3px solid rgba(100, 38, 168, 0.28);
    outline-offset: 4px;
}

#slider:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#slider-feld [class^="bg_"] {
    position: absolute;
    top: 50%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--slider-marker-size);
    height: var(--slider-marker-size);
    margin: 0;
    padding: 0;
    color: #222;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    background: #dceaf3;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0.95;
}

#slider-feld .bg_first {
    left: 0;
}

#slider-feld .bg_between_1 {
    left: 50%;
}

#slider-feld .bg_last {
    left: 100%;
}

#slider-feld .stop {
    color: #111;
    background: #b2e2ff;
    /*#d92727;*/
}

#slider-feld .pause {
    color: #111;
    background: #b2e2ff;
    /*#f3b05f;*/
}

#slider-feld .start {
    color: #fff;
    background: #b2e2ff;
    /*#16852a;*/
}

.slider-help {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 768px) {
    #slider-container {
        padding-right: 8px;
        padding-left: 8px;
    }

    #slider-feld {
        --slider-field-width: min(245px, calc(100vw - 92px));
        --slider-size: 62px;
        --slider-active-size: 72px;
        --slider-marker-size: 38px;
    }

    #slider {
        font-size: 13px;
    }

    #slider-feld [class^="bg_"] {
        font-size: 10px;
    }
}

/* Definitiver Tagesabschluss */

.finish-day-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.finish-day-form small {
    color: var(--muted);
}

.finish-day-button:focus-visible {
    outline: 3px solid rgba(153,27,27,.22);
    outline-offset: 2px;
}

.day-locked-message {
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: #166534;
    font-weight: 700;
    text-align: right;
}

@media (max-width: 768px) {
    .finish-day-form {
        align-items: stretch;
        flex-direction: column;
    }

    .finish-day-form small {
        text-align: center;
    }

    .finish-day-button {
        width: 100%;
    }

    .day-locked-message {
        text-align: center;
    }
}

/* ==========================================================
   Protokoll / tabellarische Auswertung
   ========================================================== */

.report-wrap {
    width: min(100% - 24px, 1400px);
    margin: 18px auto 34px;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: end;
    justify-content: space-between;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    margin-bottom: 2px;
}

.report-period-form,
.report-switches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
}

.report-date {
    display:flex;
    gap:8px;
}

.report-period-form label {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.report-period-form input {
    width: auto;
    min-width: 145px;
    height: 36px;
    margin: 3px 0 0;
    padding: 5px 8px;
    font-size: 15px;
    border-radius: 5px;
}

.report-button.is-format {
    width: fit-content;
}

.report-summary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 16px;
    align-items: baseline;
    margin: 12px 0;
    padding: 8px 12px;
    background: #fff;
    border-left: 5px solid var(--purple);
}

.report-summary span {
    font-weight: 600;
}

.report-summary strong {
    font-size: 22px;
}

.report-summary small {
    grid-column: 2;
    color: var(--muted);
    font-size: 11px;
}

.protocol-table-card {
    background: #e7e9ed;
    /*! border: 1px solid #b9bdc4; */
    /*! border-radius: 0; */
}

.protocol-table-scroll {
    overflow: auto;
    max-width: 100%;
}

.protocol-table {
    width: min(100%,750px);
    max-width:100%;
    /*! min-width: 760px; */
    border-spacing: 0;
    border-collapse: separate;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    margin-top: 20px;
    margin-bottom: 10px;
    outline: 2px solid var(--protocol-table-head);
}

.protocol-table th,
.protocol-table td {
    padding: 4px 6px;
    text-align: right;
    border-right: 1px solid #0b0b0b;
    border-bottom: 1px solid #0b0b0b;
    white-space: nowrap;
    background:white
}

.protocol-table td:nth-child(1) {
   border-right:0 important;
   box-shadow: 1px 0 0 red !important; 
}


.protocol-table th:last-child,
.protocol-table td:last-child {
    border-right: 0;
}

.protocol-table thead th {
    z-index: 2;
    background: var(--protocol-table-head);
    color: white;
}

.protocol-table thead .protocol-groups th{
	text-align:center;
	font-size: 14px;
}

.protocol-groups th.date-column,
.protocol-categories th.date-column
{
	border-bottom:0;
	background:darkblue;
}

.protocol-categories th {
    /* top: 31px;
     max-width: 105px; */
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
	width: 10px;
    text-align: left !important;
    white-space: nowrap;
    padding: 10px;
}

.protocol-categories th.total-column,
.protocol-categories th.date-column{
	font-size:14px;
}

.protocol-table .date-column,
.protocol-table tbody [scope="row"]
{
    position: sticky;
    left: 0;
}


.protocol-table thead th,
.protocol-table tbody th,
.protocol-table tfoot th {
    z-index: 3;
    text-align: left;
}

.protocol-table thead .date-column {
    
	z-index: 5;
    max-width: 140px;
    /*! width: 100px; */
}

.protocol-table .total-column,
.protocol-table .total-cell {
    font-weight: 600;
    max-width:100px
}

.protocol-table tbody tr:nth-child(even) td,
.protocol-table tbody tr:nth-child(even) th {
   background-color: #e3e3e3;
}

.protocol-table tbody tr:hover td,
.protocol-table tbody tr:hover th {
    background-color: var(--report-row);
    /* #fff8dc;	report.php: Zeile markieren */
}

.protocol-table tbody tr:nth-child(odd) td:nth-child(2),
.protocol-table tbody th:nth-child(2) {
	background: #eee !important;
	position:sticky;
	left:0;
}

.protocol-table tbody tr:nth-child(even) td:nth-child(2){
	background: #d0d0d0 !important;
	position:sticky;
	left:0;
}

.protocol-table th:first-child,
.protocol-table td:first-child{
    min-width: 100px;
}

.protocol-table tbody th small {
    float: right;
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.protocol-table tbody tr.is-manual .total-cell {
    color: #8a5200;
}

.protocol-table .is-empty-month {
    color: #999;
}

.protocol-table tfoot th,
.protocol-table tfoot td {
    /*! position: sticky; */
    bottom: 0;
    z-index: 2;
    color: #fff;
    font-weight: 600;
    background: #4a4e57;
    border-bottom: 0;
}

.protocol-table tfoot th {
    z-index: 4;
}

.correction-column,
.correction-cell {
    min-width: 88px !important;
    text-align: center !important;
}

.correction-details {
    position: relative;
}

.correction-details summary {
    display: inline-block;
    padding: 3px 7px;
    color: var(--purple);
    font-size: 12px;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    background: var(--purple-soft);
    border-radius: 4px;
}

.correction-details summary::-webkit-details-marker {
    display: none;
}

.correction-form {
    position: absolute;
    top: 28px;
    right: 0;
    z-index: 20;
    width: 260px;
    padding: 10px;
    text-align: left;
    white-space: normal;
    background: #fff;
    border: 1px solid #9ca0a8;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.correction-form label {
    margin: 0 0 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.correction-form input {
    height: 34px;
    margin: 2px 0 0;
    padding: 5px 7px;
    font-size: 14px;
    border-radius: 4px;
}

.correction-form button {

    margin-right: 4px;


}

.report-muted,
.report-note,
.report-empty {
    color: var(--muted);
}

.report-note {
    margin: 20px 2px 0;
    font-size: 12px;
    max-width: 100ch;
}

.report-empty {
    padding: 18px;
}

@media (max-width: 768px) {
    .report-wrap {
        width: calc(100% - 12px);
        margin-top: 8px;
    }

    .report-toolbar,
    .report-period-form,
    .report-switches {
        /*align-items: stretch;*/
    }

    .report-toolbar {
        display: grid;
    }

    .report-period-form,
    .report-switches {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .report-period-form label {
        grid-column: 1 / -1;
    }

    .report-period-form input,
    .report-button {
        width: 100%;
    }
}

/* Protokoll: Korrektur einzelner Rubrikzellen */

.rubric-time-cell {
    position: relative;
    min-width: 60px;
}

.rubric-time-cell.is-corrected {
    background: var(--report-row);
}

.cell-correction-details {
    position: relative;
}

.cell-correction-details > summary {
    display: block;
    min-width: 60px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.cell-correction-details > summary::-webkit-details-marker {
    display: none;
}

.cell-correction-details > summary:hover {
    text-decoration: underline;
}

.cell-edit-mark {
    margin-left: 4px;
    font-size: 12px;
}

.cell-correction-form {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    width: 260px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    text-align: left;
}

.cell-correction-form strong,
.cell-correction-form small {
    display: block;
    margin-bottom: 6px;
}

.cell-correction-form label {
    margin: 8px 0;
    font-size: 13px;
}

.cell-correction-form input {
    margin-top: 3px;
    padding: 8px;
    font-size: 15px;
}

.cell-correction-actions {
    display: flex;
    gap: 6px;
}
.cell-correction-actions button {
    flex:1
   }

@media (max-width: 768px) {
    .cell-correction-form {
        position: fixed;
        top: 50%;
        left: 50%;
        width: min(300px, calc(100vw - 28px));
        transform: translate(-50%, -50%);
    }
}

/* Protokoll-Popups: immer nur eines offen, mit eigenem Schliessen-Button */

.cell-correction-form,
.correction-form {
    position: relative;
}

.popup-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;


    text-align: center;

}

.popup-close-window {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  margin: 0;
  font-size:24pt;
  font-weight:400;

}

.cell-correction-form > strong,
.correction-form > label:first-of-type {
    padding-right: 34px;
}

/* Protokoll: kompakte vertikale Rubrikenüberschriften */

.protocol-categories th {
    /*writing-mode: sideways-lr;
    width: 10px;
    text-align: left !important;
    white-space: nowrap;
    padding: 10px;*/
}

.app-version {
    margin-right: auto;
    margin-left: 8px;
    font-size: 12px;
    opacity: .7;
    margin-top: 10px;
}


/* ============================================================
   Seitenspezifische Arbeitsflächen
   ============================================================ */
user-sheet,
master-data-sheet,
month-close-sheet,
organisation-sheet,
rapport-sheet,
invoice-sheet,
category-sheet,
master-data-sheet,
service-types-sheet,
today-sheet,
journal-sheet,
archive-sheet,
system-sheet,
organisation-settings-sheet,
maintenance-sheet {
    display: block;
    width: fit-content;
    margin: 0 auto;
    width: 100%;
}

customer-sheet,
billing-sheet{
    display: block;
    width: fit-content;
    margin: 0 auto;
    width: min(100%, 1600px);
	margin-top:80px;
}



/* ============================================================
   Alpha 3: kompakter Protokollkopf und besser lesbare Kalenderzeilen
   ============================================================ */
protocol-sheet{
  min-width: 750px;
  width: fit-content;
  max-width: calc(100vw - 24px);
  display: block;
  margin: 0 auto;
}

.protocol-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
}

.protocol-heading h1 {
    margin: 0;
    font-size: 22px;
}

.protocol-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.protocol-heading-total {
    display: grid;
    justify-items: end;
}

.protocol-heading-total span,
.protocol-heading-total small {
    color: var(--muted);
    font-size: 12px;
}

.protocol-heading-total strong {
    font-size: 28px;
    line-height: 1.05;
}

.protocol-table tbody tr.is-weekend > * {
    background: #f6f6f6;
}

.protocol-table tbody tr.is-week-start > * {
    border-top: 2px solid #8f939a;
}

.protocol-table tbody tr.is-holiday > th:first-child {
    color: #a52020;
}

.holiday-name {
    display: block;
    max-width: 95px;
    color: #a52020;
    font-size: 10px;
    font-weight: 600;
    white-space: normal;
}

@media (max-width: 768px) {
    protocol-sheet{
        min-width:0;
    }
    .protocol-heading {
        align-items: flex-start;
    }

    .protocol-heading-total strong {
        font-size: 22px;
    }
    .mobile-hide{
        display:none;
    }
}

/* ============================================================
   Alpha 4: gestuftes Korrektur-Popup
   Zeit ist sofort sichtbar; Notiz und Barauslagen öffnen per Icon.
   ============================================================ */

.cell-correction-form {
    width: 310px;
}

.popup-time-field {
    display: block;
    margin: 8px 0;
}

.popup-short-input {
    /*! width: 70px !important; */
}

.popup-wide-input {
    width: 175px !important;
}

.popup-field-tools {
    display: flex;
    gap: 6px;
    margin: 10px 0 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.popup-tool-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;


}

.popup-tool-button svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.popup-tool-button.has-value::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;


}

.popup-extra-panel {
    margin: 6px 0 10px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fafafa;
}

.popup-extra-panel[hidden] {
    display: none;
}

.popup-extra-panel label {
    margin: 0;
}

.popup-extra-panel input {
    display: inline-block;
    margin-right: 4px;
}

.popup-extra-panel small {
    margin-top: 6px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .cell-correction-form {
        width: min(320px, calc(100vw - 28px));
    }

    .popup-tool-button span {
        display: inline;
    }

    .popup-wide-input {
        width: calc(100% - 84px) !important;
    }
}

/* ============================================================
   Alpha 5: Journal
   Automatische Timeline aus Arbeitsabschnitten plus kurze Notizen.
   ============================================================ */

.journal-wrap {
    width: min(800px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 40px;
}

.journal-toolbar {
    display: flex;
    align-items: end;
    gap: 8px;
    margin-bottom: 14px;
}

.journal-toolbar form,
.journal-toolbar label {
    margin: 0;
}

.journal-toolbar input {
    width: auto;
    min-height: 36px;
    margin: 3px 0 0;
    padding: 6px 8px;
    font-size: 15px;
}

.journal-day-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;


}

.journal-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    background: #fff;
}

.journal-heading h1,
.journal-heading p {
    margin: 0;
}

.journal-heading h1 {
    font-size: 21px;
}

.journal-heading p {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.journal-heading > strong {
    font-size: 27px;
}

.journal-general {
    padding: 14px 16px;
    border: 1px solid var(--line);
    box-shadow: none;
}

.journal-general h2 {
    margin: 0 0 8px;
    font-size: 16px;
}

.journal-timeline {
    margin-top: 18px;
}

.journal-entry {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
}

.journal-time-marker {
    position: relative;
    padding-top: 11px;
    color: #444;
    font-size: 13px;
    text-align: left;
}

.journal-time-marker span {
    position: absolute;
    top: 34px;
    bottom: -10px;
    left: 21px;
    width: 2px;
    background: var(--line);
}

.journal-time-marker::after {
    content: "";
    position: absolute;
    top: 30px;
    left: 17px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--purple);
}

.journal-entry:last-child .journal-time-marker span {
    display: none;
}

.journal-entry-card {
    margin-bottom: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--section-border-radius);
}

.journal-entry-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.journal-entry-card h2,
.journal-entry-card small {
    margin: 0;
}

.journal-entry-card h2 {
    font-size: 17px;
}

.journal-entry-card header small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.journal-entry-time {
    display: grid;
    justify-items: end;
    flex: 0 0 auto;
}

.journal-entry-time strong {
    font-size: 18px;
}

.journal-work-note,
.journal-expense {
    margin: 9px 0 0;
    padding: 8px 10px;
    border-radius: 5px;
    background: #f6f6f6;
    font-size: 13px;
}

.journal-expense {
    background: #f7f1ff;
    color: #4c247e;
}

.journal-note-list {
    display: grid;
    gap: 4px;
    margin: 9px 0 0;
    padding: 0;
    list-style: none;
}

.journal-note {
    display: grid;
    grid-template-columns: 26px 1fr auto 24px;
    align-items: start;
    gap: 5px;
    padding: 5px 6px;
    border-bottom: 1px dotted var(--line);
    font-size: 13px;
}

.journal-note.is-done > span {
    color: var(--muted);
    text-decoration: line-through;
}

.journal-note small {
    padding-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.journal-note form {
    margin: 0;
}

.journal-note button {
    width: 24px;
    height: 24px;


}

.journal-add-form {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 6px;
    margin-top: 9px;
}

.journal-add-form textarea {
    min-height: 38px;
    margin: 0;
    padding: 7px 9px;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
}

.journal-empty {
    margin: 5px 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .journal-wrap {
        width: min(100% - 16px, 800px);
        padding-top: 10px;
    }

    .journal-toolbar {
        flex-wrap: wrap;
    }

    .journal-entry {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .journal-time-marker span {
        left: 17px;
    }

    .journal-time-marker::after {
        left: 13px;
    }

    .journal-entry-card {
        padding: 10px;
    }
}

/* --------------------------------------------------------------------------
   Kundenrapporte
   -------------------------------------------------------------------------- */

.rapport-wrap {
    width: min(calc(100% - 24px),1000px);
    margin: 0 auto;
    padding: 18px 0 36px;
}

.rapport-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.rapport-filter {
    display: grid;
    grid-template-columns: minmax(180px,1fr) 135px 135px auto;
    gap: 8px;
    align-items: end;
    margin: 0;
}

.rapport-filter label {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.rapport-filter input,
.rapport-filter select {
    margin-top: 4px;
    padding: 8px;
    font-size: 14px;
}

.rapport-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.customer-rapport {
    border: 1px solid var(--line);
    background: #fff;
}

.customer-rapport-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 2px solid #222;
}

.rapport-kicker {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.customer-rapport-head h1 {
    margin: 0;
    font-size: 28px;
}

.customer-rapport-head p:last-child {
    margin: 5px 0 0;
}

.rapport-owner {
    display: grid;
    justify-items: end;
    font-size: 13px;
}

.rapport-owner span {
    color: var(--muted);
}

.rapport-section {
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.rapport-section > header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.rapport-section h2 {
    margin: 0;
    font-size: 19px;
}

.rapport-section > header > strong {
    font-size: 18px;
    white-space: nowrap;
}

.rapport-section h3 {
    margin: 12px 0 5px;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.rapport-notes ul {
    margin: 0;
    padding-left: 19px;
}

.rapport-notes li {
    margin: 3px 0;
    font-size: 14px;
}

.rapport-expenses table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rapport-expenses td,
.rapport-expenses th {
    padding: 5px 4px;
    border-top: 1px dotted var(--line);
    text-align: left;
}

.rapport-expenses td:last-child,
.rapport-expenses th:last-child {
    text-align: right;
    white-space: nowrap;
}

.customer-rapport-total {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;

}

.customer-rapport-total > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 22px;
    background: var(--page-background);
}

.customer-rapport-total span {
    font-size: 13px;
    font-weight: 700;
}

.customer-rapport-total strong {
    font-size: 19px;
}

.rapport-empty {
    margin: 0;
    padding: 24px 22px;
    color: var(--muted);
}

@media (max-width: 768px) {
    .rapport-toolbar {
        display: block;
    }

    .rapport-filter {
        grid-template-columns: 1fr 1fr;
    }

    .rapport-filter label:first-child {
        /*grid-column: 1 / -1;*/
    }

    .rapport-actions {
        margin-top: 8px;
    }

    .customer-rapport-head {
        display: block;
    }

    .rapport-owner {
        justify-items: start;
        margin-top: 10px;
    }

    .customer-rapport-total {
        grid-template-columns: 1fr;
    }
}

@media print {
    .no-print,
    .topbar {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .rapport-wrap {
        width: 100%;
        padding: 0;
    }

    .customer-rapport {
        border: 0;
    }

    .rapport-section {
        break-inside: avoid;
    }
}

/* alpha9: Mandanten, Berechtigungen und Journal-Sichtbarkeit */

.journal-add-form select {
    width: auto;
    min-width: 150px;
    margin: 0;
    padding: 8px 10px;
    font-size: 14px;
}

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

.admin-table th,
.admin-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.admin-inline-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: end;
    margin-top: 16px;
}

.admin-inline-form input,
.admin-inline-form select {
    margin: 0;
}

.category-list li small {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 768px) {
    .admin-inline-form {
        grid-template-columns: 1fr;
    }

    .journal-add-form select {
        width: 100%;
    }
}

/* --------------------------------------------------------------------------
   AP2 – angemeldeter Benutzer im Seitenkopf
   -------------------------------------------------------------------------- */

.topbar-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
    flex: 0 0 auto;
}

.topbar-user {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    color: #fff;
    line-height: 1.15;
    text-align: right;
}

.topbar-user-name {
    max-width: 230px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-email {
    max-width: 230px;
    overflow: hidden;
    color: #c9c9ce;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar nav {
    flex: 0 0 auto;
}

.today-head {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.today-head .topbar-user {
    color: #222;
}

.today-head .topbar-user-email {
    color: var(--muted);
}

.today-head nav {
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .topbar,
    .topbar-wrap {
        flex-wrap: wrap;
        gap: 7px 12px;
    }

    .topbar-user {
        order: 2;
        max-width: 55%;
    }

    .topbar nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-top: 5px;
        border-top: 1px solid rgba(255,255,255,.16);
        white-space: nowrap;
    }

    .today-head {
        justify-content: space-between;
    }

    .today-head .topbar-user {
        order: 1;
        max-width: 65%;
        margin-left: 0;
        align-items: flex-start;
        text-align: left;
    }

    .today-head nav {
        order: 2;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Sprint 12.6: vereinfachte Arbeitseinheit ohne Hauptschalter */


.work-unit-kicker {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .65;
}

.timeout-notice {
    margin: 0 0 1rem;
    padding: 1rem;
    border: 1px solid currentColor;
    border-radius: 14px;
    background: #fff;
}

.timeout-notice strong {
    display: block;
    margin-bottom: .35rem;
}

.timeout-notice p {
    margin: .25rem 0 .75rem;
}

.timeout-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}


/* AP2 13.3b – Arbeitsnotizen und nachvollziehbare Daueranpassungen */
.protocol-work-notes {
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--surface-border);
}

.protocol-work-notes ul {
    margin: var(--space-xs) 0 0;
    padding-left: 1.1rem;
}

.protocol-work-notes li {
    margin-bottom: var(--space-xs);
}

.protocol-work-notes small {
    margin-left: var(--space-xs);
    color: var(--text-muted, #666);
}

.journal-adjustment {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--surface-border);
}

.journal-adjustment > summary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted, #555);
    cursor: pointer;
}

.journal-adjustment > summary::-webkit-details-marker {
    display: none;
}

.journal-adjustment dl {
    margin: var(--space-sm) 0 0;
    max-width: 420px;
}

.journal-adjustment dl > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    padding: var(--space-xs) 0;
}

.journal-adjustment dt {
    color: var(--text-muted, #666);
}

.journal-adjustment dd {
    margin: 0;
    font-weight: 600;
}

.protocol-day-notes {
    margin-top: var(--space-xs);
    font-weight: 400;
}

.protocol-day-notes > summary {
    cursor: pointer;
    font-size: .78rem;
    color: var(--text-muted, #666);
}

.protocol-day-notes ul {
    min-width: 220px;
    margin: var(--space-xs) 0 0;
    padding-left: 1rem;
    text-align: left;
    font-size: .78rem;
}


/* Journal: einheitliche Detailansicht für nachträgliche Anpassungen */
.journal-duration-line,
.journal-adjusted-value > p,
.journal-expense {
    display: flex;
    align-items: baseline;
    gap: var(--space-xs);
}

.journal-duration-line {
    justify-content: flex-end;
}

.adjustment-popover {
    position: relative;
    display: inline-block;
    margin: 0;
}

.adjustment-popover > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted, #555);
    cursor: pointer;
    list-style: none;
}

.adjustment-popover > summary::-webkit-details-marker {
    display: none;
}

.adjustment-popover-icon {
    display: inline-block;
    font-size: .9em;
    line-height: 1;
}

.adjustment-popover-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + var(--space-xs));
    right: 0;
    width: max-content;
    min-width: 280px;
    max-width: min(460px, 85vw);
    padding: var(--space-sm);
    background: var(--surface-background);
    border: 1px solid var(--surface-border);
    border-radius: var(--section-border-radius);
    box-shadow: 0 6px 18px rgb(0 0 0 / 14%);
}

.adjustment-popover-title {
    display: block;
    margin-bottom: var(--space-sm);
}

.adjustment-popover dl {
    margin: 0;
}

.adjustment-popover dl > div {
    display: grid;
    grid-template-columns: minmax(160px, .9fr) minmax(170px, 1.1fr);
    gap: var(--space-md);
    padding: var(--space-xs) 0;
}

.adjustment-popover dt {
    color: var(--text-muted, #666);
}

.adjustment-popover dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.journal-adjusted-value {
    margin: var(--space-sm) 0;
}

.journal-adjusted-value > p {
    margin: 0;
}

.journal-adjusted-note > p {
    padding-left: var(--space-sm);
    border-left: 3px solid var(--surface-border);
}

@media (max-width: 768px) {
    .adjustment-popover-panel {
        right: auto;
        left: 0;
        min-width: min(280px, 82vw);
    }

    .adjustment-popover dl > div {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

}

/* ============================================================
   Sprint 13.4g: Protokollnavigation und mobile Korrektur-Popups
   ============================================================ */
.report-period-form {
    display: inline-flex;
    align-items: end;
    gap: 6px;
}

.report-period-form label {
    min-width: 9ch;
}

.report-period-form input[type="text"] {
    width: 10ch;
    text-align: center;
}

.report-period-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-width: 36px;
    height: 34px;
    margin-bottom: 1px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: inherit;
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
    margin-top: 4px;
}

.report-period-arrow:hover,
.report-period-arrow:focus-visible {
    border-color: var(--purple);
    color: var(--purple);
}

@media (max-width: 768px) {
    .report-period-form {
        width: auto;
        max-width: 100%;
    }

    .report-period-form input[type="text"] {
        min-width: 7ch;
        /*min-width: 60px;*/
    }

    .cell-correction-details[open] .cell-correction-form,
    .correction-details[open] .correction-form {
        position: fixed !important;
        z-index: 1000;
        top: max(12px, env(safe-area-inset-top)) !important;
        right: max(12px, env(safe-area-inset-right)) !important;
        bottom: max(12px, env(safe-area-inset-bottom)) !important;
        left: max(12px, env(safe-area-inset-left)) !important;
        width: auto !important;
        max-width: 420px;
        max-height: none;
        margin: auto;
        overflow-x: hidden;
        overflow-y: auto;
        transform: none !important;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
}

/* AP2 13.5b – Status der lokalen Start/Stop-Ausfallsicherung auf Heute. */
.offline-time-status {
    margin: 0 0 12px;
    padding: 8px 10px;
    border: 1px solid currentColor;
    border-radius: 6px;
    font-size: .92rem;
}

.offline-time-status[data-status-type="offline"],
.offline-time-status[data-status-type="warning"] {
    font-weight: 600;
}

.offline-time-status[data-status-type="synced"] {
    opacity: .8;
}

/* AP2 - Journal-Barauslagen, kompakte Benutzerformatierung */
.journal-entry-card .entry-detail-panel.expense-fields {
    display: block;
}

.journal-expense-form {
    width: 100%;
    margin: .35rem 0;
    /*! padding: 0 10px 0 10px; */
    box-sizing: border-box;
}

.journal-new-expense-label {
    display: block;
    margin-bottom: .35rem;
}

.journal-expense-row {
	display:flex;
	gap:0.5rem;
	justify-content:space-between;
}

.journal-expense-fields {
	display: flex;
    gap: .5rem;
    align-items: center;
    min-width: 0;
}

.journal-expense-fields input[name="expense_amount"] {
    flex: 0 0 7rem;
    width: 7rem;
    min-width: 0;
}

.journal-expense-fields input[name="expense_description"] {
    flex: 1 1 auto;
    min-width: 14rem;
}

.journal-expense-upload {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex: 0 0 auto;
}

.journal-expense-upload .icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;

}

.journal-expense-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-left: auto;
    flex: 0 0 auto;
}

.journal-expense-actions .expense-icon-button {
    width: 36px;
    height: 36px;
    margin: 0;

    text-align: center;
}

.journal-expense-actions .danger {
    color: var(--red);
}

.journal-expense-meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 1.2rem;
    margin-top: .25rem;
    font-size: 12px;
    color: #666;
}

.journal-expense-meta a {
    font-size: inherit;
}

.journal-expense-remove {
    display: inline-flex;
    gap: .25rem;
    align-items: center;
}

.journal-expense-remove input {
    margin: 0;
}

.protocol-expense-receipts {
    display: grid;
    gap: .15rem;
    margin-top: .3rem;
    font-size: 11px;
    line-height: 1.2;
}

.protocol-expense-receipts a {
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .journal-expense-row {
        align-items: flex-start;
    }

    .journal-expense-fields {
        flex-wrap: wrap;
    }

    .journal-expense-fields input[name="expense_description"] {
        flex: 1 1 calc(100% - 8rem);
    }
}





/* AP2 - Journal: effektives, gegebenenfalls korrigiertes Tagestotal */
.journal-day-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-xs);
}

.journal-day-total > strong {
    font-size: 27px;
}

.journal-day-total.is-corrected > strong {
    text-decoration: underline dotted;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
}
