@import url("./../../css/font/font.css");
@import url("./../../css/dialog.css");
@import url("./../../css/calendar.css");
@import url("./neoChecker.css");
@import url("./dashboard.css");

:root {
    --bg: #eef5fb;
    --menu-font-color: #f7fbff;
    --main-background: rgba(255, 255, 255, 1);
    --ink: #1d2b3a;
    --muted: #6b7f94;

    --nav-pill: #f4f9ff;
    --nav-pill-border: rgba(20, 40, 70, .08);

    --brand: #1a74b8;

    --primary-color: #273e69;
    /* dark blue used in active tab + dark list item */
    --primary-2: #2b4a73;
    --primary-3: #1f3655;
    --secondary-color: #DAE8F4;
	--third-color: #8A8A8A;
	--basic-font-color: #252525;
	--menu-font-color: #fff;
	--background-grey: #FDFDFD;
	--background-grey2: #d9d9d9;
	--background-grey3: #f2f2f2;
    --hover-color: #DAE8F4;

    --shadow-sm: 0 6px 18px rgba(20, 40, 70, .08);
    --shadow-md: 0 12px 28px rgba(20, 40, 70, .10);

    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;

    --sidebar-w: min(20%, 340px);
    --header-h: 92px;

    --icon-size: 30px;
    --bi-font-size: 18px;
    --custom-red: #e35b6a;
    --custom-green: #44c38a;
    --custom-yellow: #f2c34d;
    --custom-blue:  #4aa3df;
    --custom-light-blue: #c3f0ff;
	--custom-light-pink: #fae0f3;
	--custom-turquoise: #CAE8CA;
    --custom-orange: #FFECC3;
    --custom-circle-red: #B83737;
	--custom-circle-orange: #FF914D;
	--custom-circle-green: #00BF63	;
	--custom-circle-darkgreen: #68916E;

    /* Accent Blues (Tweaks panel) */
    --accent-blue-1: #2f6fe0;
    --accent-blue-2: #2a6fdb;
    --accent-blue-3: #1f6fa8;
    --accent-blue-4: #3b56c0;

    /* Input Field — Bordered variant (default) */
    --field-bordered-fill: #ffffff;
    --field-bordered-border: #93a6cc;
    --field-bordered-border-hover: #5f78b0;

    /* Input Field — Disabled state */
    --field-disabled-fill: #eef1f7;
    --field-disabled-border: #c9d3e6;
    --field-disabled-color: #515d7b;

    /* Shared focus styling */
    --field-focus-border: var(--accent-blue-1);
    --field-focus-ring: 0 0 0 3px rgba(47, 111, 224, 0.18);

    /* MA Result Colors */
    --ov-rh: 22px;
    --ov-fs: 12px;
    --ov-pad-x: 16px;
    --ov-line: rgba(20, 40, 70, .09);
    --ov-line-soft: rgba(20, 40, 70, .055);
    --ov-tint: #f4f9ff;
    --ov-tint-2: #eaf2fb;
    --ov-muted-2: #94a6ba;
    --ov-accent: var(--accent-blue-2);
    --ov-pos: #1f8a5b;
    --ov-neg: #c0485a;
}



* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font: 12px/1.35 "Ubuntu", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    overflow: hidden;
    scrollbar-gutter: stable;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(39, 62, 105, 0.5); 
    border-radius: 3px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(39, 62, 105, 0.7);
}

input,
select {
    border: 1px solid var(--field-bordered-border);
    color: var(--basic-font-color);
}

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

input[type="checkbox"] {
    accent-color: var(--primary-color);
    cursor: pointer;
}

#home-logo {
    position: absolute;
    display: block;
    max-height: 200px;
    max-width: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

#loader {
    display: flex;
    position: absolute;
    width: 100px;
    height: 100px;
    padding: 10px;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
}

#loader-div {
    display: none;
    visibility: visible;
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(1px);
    background-color: rgba(255, 255, 255, 0.2);
    top: 0;
    left: 0;
}

#loader svg {
    stroke: var(--primary-color);
    stroke-width: 2;
    stroke-linejoin: round;
    fill: none;
}

#loader path {
    animation: draw 1.33s ease-out forwards infinite;
}

#loader #path1 {
    stroke-dasharray: 180;
    stroke-dashoffset: 180;
}

#loader #path2 {
    stroke-dasharray: 155;
    stroke-dashoffset: 155;
}

#loader #path3 {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
}

#loader #path4 {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#loader #path5 {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#loader #path6 {
    stroke-dasharray: 190;
    stroke-dashoffset: 190;
}

#loader #path7 {
    stroke-dasharray: 155;
    stroke-dashoffset: 155;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.meter {
    width: 80%;
    height: 6px;
    position: relative;
    background: var(--nav-pill);
    overflow: hidden;
    margin: 4px;
    border-radius: 10px;
}

.meter span {
    display: block;
    height: 100%;
}

.progress {
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.6s ease;
}

#progressbar-dialog {
    display: none;
    position: absolute;
    margin: auto;
    right: 10px;
    bottom: 10px;
    min-height: 80px;
    width: 250px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid var(--custom-green);
    border-radius: 10px;
    background-color: var(--custom-turquoise);
    z-index: 999999;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.error-alerts {
		overflow: auto;
		max-height: 500px;
	}

#nachrichten-feed {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    row-gap: 5px;
    pointer-events: none;
}

#kleine-system-nachricht {
    display: flex;
    width: 250px;
    min-height: 50px;
    max-height: 100px;
    padding: 10px 10px;
    padding-left: 30px;
    font-size: 14px;
    z-index: 99999;
    border: 1px solid black;
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
    background-repeat: no-repeat;
    background-size: auto;
    background-position: 5px center;
    pointer-events: none;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.bg-green {
    background-color: var(--custom-green);
    color: white;
    background-image: url("./icons/check-lg.svg");
}

.bg-red {
    background-color: var(--custom-red);
    color: white;
    background-image: url("./icons/exclamation-circle.svg");
}

.bg-yellow {
    background-color: var(--custom-yellow);
    color: black;
    background-image: url("./icons/info-circle.svg");
}

.bi-info-circle {
    /* color: var(--custom-green); */
}
.bi-info-circle:hover::before {
    content: "\f430";
}

#ma-sofortmeldung-beantragen-dialog p,
#ma-sofortmeldung-stornieren-dialog p {
    display: block;
}

/* App shell */
.app {
    height: 100%;
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
}

/* Sidebar */
.sidebar {
    position: relative;
    padding: 8px;
    border-right: 1px solid rgba(20, 40, 70, .06);
    overflow: auto;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 100;
}
#sidebar-toggle-menu {
    display: none;
}

.sidebar-toggle {
    display: none;
    z-index: 101;
}

.sidebar-toggle-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

#sidebar-toggle-menu > img,
#sidebar-toggle-title {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.brandRow {
    display: grid;
    align-items: flex-start;
    grid-template-columns: 2fr 1fr;
    gap: 2px;
    min-height: 90px;
    padding: 0 6px;
}

.logo {
    display: flex;
    align-items: flex-start;
    height: 100%;
    gap: 2.5px;
}

.mark {
    line-height: 0.95;
    font-weight: bold;
    letter-spacing: .2px;
    font-size: 26px;
    color: var(--brand);
    user-select: none;
}

.siteMeta {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    text-align: right;
    color: var(--muted);
    font-size: 12px;
    height: 100%;
    justify-content: flex-start;
}

.when {
    font-weight: bold;
}

.place {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 12px;
    grid-column: span 2;
    text-align: right;
}

.monthRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0px 0px;
    padding: 5px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(20, 40, 70, .07);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.monthRow .monat-pfeil {
    width: var(--icon-size);
    height: var(--icon-size);
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #3e5976;
    background: rgba(255, 255, 255, .65);
    border: 1px solid rgba(20, 40, 70, .08);
    cursor: pointer;
    font-size: var(--bi-font-size);
}

.monthRow .month {
    font-weight: bold;
    color: #2d4057;
    letter-spacing: .2px;
    border: none;
}

.filtersRow {
    display: grid;
    grid-template-columns: 50% 50%;
    margin: 6px 0px;
}

.filtersRow .select {
    width: 100%;
    height: 30px;
}

.select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    border-radius: 10px;
    background: var(--primary-color);
    color: #eaf2ff;
    border: 1px solid rgba(255, 255, 255, .10);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.filtersRow .select:first-child {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: 1px;
}

.filtersRow .select:last-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 1px;
}

.search {
    margin: 0 2px 6px;
    background: rgba(255, 255, 255, .75);
    border-bottom: 1px solid var(--primary-color);
    padding: 6px 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search input {
    border: 0;
    outline: none;
    background: transparent;
    width: 100%;
    font-size: 12px;
    color: #24384f;
}

.iconBtn {
    width: var(--icon-size);
    height: var(--icon-size);
    display: grid;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(20, 40, 70, .10);
    background: rgba(255, 255, 255, .7);
    color: #34516e;
    cursor: pointer;
}

header .bi {
    font-size: var(--bi-font-size);
}

/* Employee list */
#malist {
    height: 100%;
    min-height: 280px;
    overflow: auto;
    margin-bottom: 6px;
}

#malist::-webkit-scrollbar {
    width: 10px;
}

#malist::-webkit-scrollbar-thumb {
    background: rgba(36, 62, 96, .18);
    border-radius: 999px;
    border: 3px solid rgba(255, 255, 255, .0);
    background-clip: padding-box;
}

.ma-control {
    display: grid;
    align-items: center;
    grid-template-columns: 2fr 1fr;
    gap: 5px;
    padding: 1px 4px;
    border: 1px solid var(--field-bordered-border);
    background: var(--field-bordered-fill);
    border-radius: 4px;
    margin-bottom: 1px;
    min-height: 25px;
}

.ma-control:hover {
    background: var(--hover-color);
    cursor: pointer;
}

.ma-control:hover .pgs-pnr {
    display: none;
}

.ma-control.ma-select-active {
    background: var(--primary-color);
    color: #eaf2ff;
}

.ma-control .ma-control-left {
    display: grid;
    grid-template-columns: 5fr 2fr;
    align-items: center;
    gap: 2px;
}

.ma-control:hover .ma-control-left {
    grid-template-columns: 1fr;
}

.bewerber-control .ma-control-left {
    grid-template-columns: 1fr;
}

.ma-control .ma-control-name {
    font-weight: bold;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}
.ma-control .pgs-pnr {
    font-size: 10px;
    color: rgba(45, 64, 87, .65);
    white-space: nowrap;
}
.bewerber-control .bewerber-date {
    font-size: 10px;
    color: var(--muted);
    margin: 0 2px;
}
.bewerber-control:hover .bewerber-date {
    color: var(--menu-font-color);
}

.ma-control.ma-select-active .pgs-pnr {
    color: var(--menu-font-color);
    font-weight: bold;
}

.ma-control .ma-control-icons {
    display: flex;
    align-items: center;
    gap: 2px;
}



.ma-control .ma-control-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2.5px;
    flex-shrink: 0;
    overflow: hidden;
}

.ma-control .ma-control-right:hover {
    overflow: unset;
    z-index: 10;
}

.ma-control-checkbox {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    color: #2a4666;
}

.ma-control-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand);
    cursor: pointer;
    margin: 0;
}
.ma-control.ma-select-active .ma-control-checkbox {
    color: #eaf2ff;
}
/* Bottom filters card */
.bottomCard {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    color: #eaf2ff;
}


.filter-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    grid-auto-rows: 25px;
    grid-gap: 2px;
    width: calc(100% - 2px);
    font-size: 12px;
    background-color: transparent;
}
.malist_filtertitle {
    grid-column: span 2;
    background-color: var(--primary-color);
    font-weight: bold;
}
.malist_filtertitle:first-child {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.filter-select,
.malist_filter {
    background-color: var(--main-background);
    color: var(--ink);
    font-weight: bold;
}

.malist_filter:nth-last-child(1) {
    border-bottom-right-radius: 10px;
}
.malist_filter:nth-last-child(2) {
    border-bottom-left-radius: 10px;
}

.malist_filtertitle,
.malist_title,
.malist_filter,
.malist_empty {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#ma-filter-auswahl {
    display: flex;
    flex-direction: column;
    margin-top: auto;
}

.filter-checkbox {
    margin-top: none;
    transform: scale(1.5);
}

.filter-select {
    width: 100%;
    height: 100%;
    border-color: transparent;
    font-size: 12px;
}

.malist_filter:hover,
.filter-select:hover {
    background-color: var(--hover-color);
    color: var(--ink);
    cursor: pointer;
}

#sort-name,
#sort-pnr {
    border: 1px solid var(--main-background);
    border-radius: 5px;
    padding: 0 1px;
    font-size: 14px;
    cursor: pointer;
}

#sort-name:hover, 
#sort-pnr:hover {
    background-color: var(--menu-font-color);
    color: var(--ink);
}

/* Main area */
.mainform {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Nav Buttons */
header {
    display: flex;
    align-items: flex-start;
    min-height: 100px;
}

header.header-minimized {
    min-height: 0;
}

.topbar {
    height: auto;
    padding: 8px 10px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.topbar > .tab {
    flex-basis: calc(100% / 6 - 10px);
}

.topbar > .chip {
    flex-basis: calc(100% / 10 - 10px);
}

.topbar .chip {
    font-size: clamp(11px, 0.5vw + 3px, 12px);
}

.tab {
    height: 40px;
    padding: 12px 6px;
    background: var(--nav-pill);
    border: 1px solid var(--nav-pill-border);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #294057;
    cursor: pointer;
    flex: 1 1 160px;
}

.tab .label {
    font-weight: bold;
    font-size: 12px;
    letter-spacing: .2px;
}

.tab .miniIcon {
    width: var(--icon-size);
    height: var(--icon-size);
    border-radius: 10px;
    border: 1px solid rgba(20, 40, 70, .10);
    background: rgba(255, 255, 255, .7);
    display: grid;
    place-items: center;
    color: #35526f;
    flex-shrink: 0;
    cursor: pointer;
}

.tab.topmenu-active {
    background: var(--primary-color);
    color: #eaf2ff;
    border-color: rgba(255, 255, 255, .12);
}

.tab.topmenu-active .miniIcon:not(.stale) {
    background: var(--nav-pill);
}

.tab.topmenu-active .miniIcon.stale {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #eaf2ff;
    cursor: default;
}

.tab .miniIcon:not(.stale):hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #eaf2ff;
}

.chip {
    height: 40px;
    padding: 0 8px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .75);
    border: 1px solid rgba(20, 40, 70, .10);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2b4057;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    flex: 0 1 auto;
}

.chip.submenu-active {
    background: var(--primary-color);
    color: #eaf2ff;
    border-color: rgba(255, 255, 255, .12);
}

.iconStack {
    display: flex;
    justify-content: flex-end;
    padding: 8px 10px 0;
    flex-wrap: wrap;
    gap: 6px;
    flex: 0 1 auto;
    align-items: center;
    margin-left: auto;
    min-width: 300px;
}

.neoChecker {
    flex-basis: 100%;
    display: grid;
    align-content: center;
    justify-content: center;
}

.logout-last-minute {
    color: var(--custom-red);
    font-weight: bold;
}

.chip:first-child::after {
    content: '';
    flex-basis: 100%;
}
.circleBtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(20, 40, 70, .12);
    background: rgba(255, 255, 255, .75);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    color: #2d4866;
    cursor: pointer;
}

#header-minimize-toggle {
    position: relative;
    padding-bottom: 6px;
    align-items: flex-end;
}

#header-minimize-toggle::after {
    content: "MENÜ";
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    font-size: 8px;
    font-weight: bold;
    letter-spacing: 0.03em;
    line-height: 1;
}

.tab:hover,
.chip:hover,
.circleBtn:hover,
.iconBtn:hover {
    background: var(--primary-color);
    color: #eaf2ff;
    border-color: rgba(255, 255, 255, .12);
}

.circleBtn.topmenu-active {
    background: var(--primary-color);
    color: #eaf2ff;
    border-color: rgba(255, 255, 255, .12);
}

/* Default bei Start */
.submenu {
    display: none;
}

.main-container {
    flex: 1;
    overflow: hidden;
    padding: 10px 10px 5px;
    border-radius: 12px;
    overflow: auto;
    height: 100%;
    position: relative;
}
.fieldset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    align-content: start;
    align-items: start;
    gap: 10px;
}

#main .fieldset-grid + .fieldset-grid {
    margin-top: 10px;
}

fieldset {
    --fs-border: 1px solid var(--primary-color);
    --fs-shadow: 0 16px 34px rgba(24, 47, 87, .11);
    --fs-label: #415e79;
    border: none;
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 0;
    border-radius: 12px;
    background: var(--main-background);
    box-shadow: var(--fs-shadow);
    border: 1px solid var(--nav-pill-border);
}
fieldset > legend {
    width: 100%;
    padding: 6px 12px;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 12.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
    display: block;
    background: var(--ov-tint);
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid var(--ov-line);
}

fieldset > section {
    padding: 6px;
}

fieldset .fieldset-div,
fieldset .fieldset-checkbox-div {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 4px;
    align-items: center;
    margin: 0;
    padding: 4px 6px;
    hyphens: auto;
    transition: background-color .15s ease;
}

fieldset .fieldset-checkbox-div > :first-child,
fieldset .fieldset-div > :first-child {
    color: var(--fs-label);
    font-size: 12px;
    font-weight: bold;
}

.fieldset-label {
    text-transform: uppercase;
    color: var(--ink);
    padding-left: 6px;
    font-size: 11.5px;
    margin-bottom: 2px;
}

fieldset .fieldset-div > :last-child:not(button) {
    color: #1f3146;
    word-break: break-word;
    min-width: 0;
}

fieldset .fieldset-div p {
    margin: 0;
    min-width: 0;
}

fieldset .fieldset-body {
    display: grid;
    gap: 10px;
}

fieldset textarea,
fieldset select,
fieldset input[type="text"],
fieldset input[type="number"],
fieldset input[type="date"],
fieldset input[type="email"],
fieldset input[type="time"],
fieldset input[type="month"],
fieldset input[type="file"] {
    width: 100%;
    border: 1.5px solid var(--field-bordered-border);
    border-radius: 6px;
    color: #1f3347;
    background-color: var(--field-bordered-fill);
    padding: 4px 8px;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

fieldset textarea:hover,
fieldset select:hover,
fieldset input[type="text"]:hover,
fieldset input[type="number"]:hover,
fieldset input[type="date"]:hover,
fieldset input[type="email"]:hover,
fieldset input[type="time"]:hover,
fieldset input[type="month"]:hover {
    border-color: var(--field-bordered-border-hover);
    background-color: var(--field-bordered-fill);
}

fieldset textarea:focus,
fieldset select:focus,
fieldset input[type="text"]:focus,
fieldset input[type="number"]:focus,
fieldset input[type="date"]:focus,
fieldset input[type="email"]:focus,
fieldset input[type="time"]:focus,
fieldset input[type="month"]:focus {
    outline: none;
    background-color: var(--field-bordered-fill);
    border-color: var(--field-focus-border);
    box-shadow: var(--field-focus-ring);
}

fieldset select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23415e79' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    background-repeat: no-repeat;
    background-position: center right 8px;
    padding-right: 22px;
}

fieldset textarea {
    min-height: 100px;
    resize: vertical;
}

fieldset .ma-notizfeld {
    min-height: 120px;
}

fieldset .verwenden-button,
fieldset .entfernen-button {
    font-weight: bold;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 2px 6px;
    cursor: pointer;
}

fieldset legend a {
    color: #4b73a5;
    text-decoration: none;
}

fieldset legend i {
    margin-left: 6px;
}

.fieldset6columns {
    grid-column: span 2;
}

.fieldsetAllcolumns {
    grid-column:  1 / -1;
}
.fieldset2rows {
    grid-row: span 2;
}
.fieldset3rows {
    grid-row: span 3;
}


/***** Mitarbeiterdaten *****/
p {
    margin: 5px;
}

#abgeschlossen-banner {
    font-weight: bold;
    width: 100%;
    height: 40px;
    background-color: var(--custom-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fieldset-input {
    float: right;
    width: 50%;
    font-size: inherit;
}

.hide-input-arrows::-webkit-outer-spin-button,
.hide-input-arrows::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.verwenden-button,
.entfernen-button {
    transition: transform 0.33s ease-in-out;
}

.verwenden-button:hover,
.entfernen-button:hover {
    transform: scale(0.95);
}

#ma-Zuschlaege .fieldset-div,
#ma-Zuschlaege .fieldset-checkbox-div,
#ma-Zeitkonto .fieldset-div,
#ma-Zeitkonto .fieldset-checkbox-div {
    grid-template-columns: 70% 30%;
}

#u-app .fieldset-checkbox-div,
#u-standard .fieldset-checkbox-div,
#ma-taetigkeit .fieldset-checkbox-div,
#ma-app-settings .fieldset-checkbox-div,
#ma-posten .fieldset-checkbox-div,
#ma-einsatz .fieldset-checkbox-div {
    grid-template-columns: 80% 20%;
}
#ma-app-settings .fieldset-checkbox-div {
    margin: 0;
    margin-right: 5px;
}

#u-app .fieldset-checkbox-div input[type="checkbox"],
#u-standard .fieldset-checkbox-div input[type="checkbox"],
#ma-taetigkeit .fieldset-checkbox-div input[type="checkbox"],
#ma-app-settings .fieldset-checkbox-div input[type="checkbox"],
#ma-posten .fieldset-checkbox-div input[type="checkbox"],
#ma-einsatz .fieldset-checkbox-div input[type="checkbox"] {
    margin-left: auto;
    margin-right: 5px;
}
#u-standard .fieldset-checkbox-div input[type="number"] {
    margin-left: auto;
}

#u-verzeichnisse .fieldset-div {
    grid-template-columns: 70% 15% 15%;
}

#u-verzeichnisse .u-verzeichnis-zeile > input[type="checkbox"],
#u-verzeichnisse .u-verzeichnis-zeile > i.bi-share-fill {
    grid-column: 3;
}

#u-verzeichnisse input[type="checkbox"] {
    width: fit-content;
    scale: 1.25;
    margin: auto;
}

.zeitkonto-input-div {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 0 5px;
    margin-right: 5px;
}

.fieldset-div input,
.fieldset-div select {
    width: 100%;
}

.fieldset-input[type="checkbox"] {
    float: none;
    width: fit-content;
    transform: scale(1.25);
    cursor: pointer;
}

select:required,
input:required,
fieldset select:required,
fieldset input:required {
    background-color: var(--secondary-color);
}

fieldset select:required:hover,
fieldset input:required:hover {
    background-color: var(--secondary-color);
}

fieldset select:required:focus,
fieldset input:required:focus {
    background-color: var(--secondary-color);
}

select:required:invalid,
input:required:invalid {
    border-color: var(--custom-red);
}

select:disabled,
input:disabled,
fieldset select:disabled,
fieldset input:disabled {
    border-color: var(--field-disabled-border);
    background-color: var(--field-disabled-fill);
    color: var(--field-disabled-color);
}
button:disabled {
    opacity: .7;
    cursor: default !important;
}
select:disabled:hover,
input:disabled:hover,
button:disabled:hover {
    cursor: default !important;
}

select:required:valid,
input:required:valid,
fieldset select:required:valid,
fieldset input:required:valid {
    border-color: var(--primary-color);
}

input:invalid {
    border-color: var(--custom-red);
}

.fieldset-input.important-input {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
}
.fieldset-input.important-input:invalid {
    border-color: var(--custom-circle-orange);
}


.option-icon > .icon-right {
    float: right;
}

.validation-msg {
    color: red !important;
    font-size: 12px;
    line-height: normal;
    display: flex;
    justify-content: flex-end;
    height: min-content;
    grid-column: span 2;
}

.validation-option {
    color: var(--primary-color) !important;
    font-size: 12px;
    line-height: normal;
    display: flex;
    justify-content: flex-end;
    height: min-content;
    grid-column: span 2;
}

.ma-uebersicht-status-select {
    border: none;
    background: transparent !important;
    padding: 0;
    color: var(--ink) !important;
    font-size: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    opacity: 1;
}

.ma-la-zeile, .u-la-zeile, .ma-nba-zeile, .u-nba-zeile, .mi-zeile {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
}

.historie-liste {
    overflow-x: auto;
}

.liste-zeile.ma-jh-zeile {
    display: grid;
    grid-template-columns: 0.75fr 0.5fr 1.5fr 2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    font-weight: bold;
    text-align: end;
    background-color: var(--main-background);
    min-width: 1300px;
}
.liste-zeile.ma-jh-zeile > p {
    text-align: end;
}

.liste-zeile.ma-jh-zeile > *:first-child {
    text-align: center;
}

.ma-jh-zeile:nth-child(even) {
    background-color: var(--background-grey3);
}

.ma-jh-zeile.jh-vorwert {
    background-color: var(--custom-green);
    color: var(--menu-font-color);
}
.ma-jh-zeile.jh-vorwert .bi-trash-fill:hover {
    color: var(--custom-red);
}

.accordion[u-la-button-header],
.accordion[u-nba-button-header],
.accordion[bdp-button-header] {
    font-weight: normal;
}

.ma-qu-zeile.header {
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;

}

.ma-qu-zeile.header.liste-zeile {
    position: inherit;
    z-index: inherit;
    top: 0;
}

.ma-qu-zeile input, .ma-qu-zeile select {
    width: 100%;
    min-width: 0;
    padding: 2px 4px;
    background-color: white;
}

.ma-qu-zeile select {
    padding-right: 18px;
    background-position: center right 4px;
}

.ma-qu-zeile.liste-zeile input:disabled,
.ma-qu-zeile.liste-zeile select:disabled {
    background-color: var(--background-grey3);
    border: 1px solid var(--nav-pill-border);
}

button[ma-qu-button] {
    border-radius: 5px;
}

.ma-qu-zeile {
    grid-template-columns: 0.3fr 1.5fr 1.25fr 0.9fr 1.4fr 1.4fr 0.9fr 1.15fr 0.9fr;
    column-gap: 5px;
}

.ma-qu-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
}

.ma-qu-zeile input[type="number"]::-webkit-outer-spin-button,
.ma-qu-zeile input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ma-qu-zeile input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

@media (max-width: 1300px) {
    .ma-qu-dual {
        grid-template-columns: 1fr;
    }
}

.ma-qu-zeile .bi-star,
.ma-qu-zeile .bi-star-fill {
    color: var(--primary-color);
}

.ma-qu-zeile .bi-star:hover,
.ma-qu-zeile .bi-star-fill:hover {
    color: var(--custom-yellow);
}

.ma-qu-zeile .bi-star:hover::before {
    content: "\f586";
    cursor: pointer;
}

.ma-qu-zeile .bi-star-fill:hover::before {
    cursor: pointer;
}

.ma-qu-tools {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-self: center;
    justify-items: center;
}

.regeltage-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    width: 100%;
    column-gap: 0;
    row-gap: 1px;
}

.regeltag {
    display:grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 2.5px;
    text-align: center;
}

.regeltag > div:first-child {
    font-weight: bold;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 0;
    text-align: center;
    border-radius: 0;
}

.regeltag:first-child > div:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.regeltag:last-child > div:first-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.regeltag > input[type="time"] {
    margin: 0 2px;
}

.regeltag:first-child > input[type="time"] {
    margin-left: 0;
}

.regeltag:last-child > input[type="time"] {
    margin-right: 0;
}

.regeltag > input[type="time"] {
    text-align: center;
    border-radius: 5px;
    padding: 2px 2px;
    min-width: 0;
}

.regeltag > input[type="time"]::-webkit-calendar-picker-indicator {
    display: none;
}

.text-search-results-div {
    border: 1px solid #ccc;
    background: white;
    min-height: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.text-search-results-div > div {
    padding: 2.5px;
    cursor: pointer;
}

.text-search-results-div > div:hover {
    background-color: #f0f0f0;
}

#ma-pdf-button {
    text-decoration: none;
    padding: 5px;
}

#ma-pdf-refresh {
    font-size: larger;
    margin-bottom: 5px;
    width: 50%;
}

#ma-pdf-refresh > i {
    display: inline-block;
    transition: transform 0.75s ease-in;
}

#ma-pdf-refresh:hover > i {
    display: inline-block;
    transform: rotate(360deg);
}

#download-dokumente, #entwurf-dokumente {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#download-dokumente .schriftverkehr-liste,
#entwurf-dokumente .schriftverkehr-liste {
    width: 95%;
}

.ma-notizfeld {
    width: calc(100% - 10px);
    padding: 10px;
    height: 12.5vh;
    border-radius: 10px;
    padding: 5px;
}

.ma-jh-auk-tage, .ma-jh-aug-std {
    display: grid;
    gap: 2.5px;
}

.ma-jh-auk-tage {
    grid-template-columns: repeat(3, 1fr);
}
.ma-jh-aug-std {
    grid-template-columns: repeat(4, 25%);
}
.ma-jh-auk-tage span, .ma-jh-aug-std span {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 9px;
    background: var(--custom-blue);
    color: var(--menu-font-color);
    border-radius: 5px;
    border: none;
    padding: 2px 0px;
}

.urlaubsantrag {
    background-color: white;
    padding: 2px 8px;
    border: 1px solid var(--background-grey2);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 35% 15% 25% 25%;
    align-content: center;
    align-items: center;
    margin-bottom: 2px;
    font-size: 12px;
    line-height: normal;
    box-shadow: 0 1px 2px rgba(20, 40, 70, 0.04);
}

/* Header for the Urlaubsanträge section */
.ma-ua-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.ma-ua-title {
    font-weight: bold;
}

/* Filter pill sitting in the header */
.ma-ua-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px;
    background: white;
    border: 1px solid var(--background-grey2);
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(20, 40, 70, 0.08);
}
.ma-ua-filter i {
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.ma-ua-filter i:hover {
    opacity: 0.7;
}

.urlaubsantrag .text-date-short {
    padding: 0 2.5px;
}

.urlaubsantrag-status {
    text-align: center;
} 

.urlaubsantrag-aktion {
    display:flex; 
    justify-content:space-evenly;
}

.urlaubsantrag-aktion > div {
    cursor: pointer;
}

.urlaubsantrag-aktion > div:hover {
    opacity: 70%;
}

.icon-button {
    border: none;
    cursor: pointer;
    background-color: transparent;
}

.icon-button:disabled > i {
    color: var(--background-grey);
}

.ma-ua-liste {
    max-height: 20vh;
    overflow-y: auto;
}

.u-urlaubssperre-list {
    max-height: 40vh;
    overflow-y: scroll;
}

.ma-mutterschutz-item ul,
.u-urlaubssperre-item ul {
    padding-left: 20px;
    margin-top: 0;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    background-color: white;
    line-height: 1.5;
}

.dokument-name {
    text-decoration: underline;
    color: var(--primary-color);
    overflow: clip;
}

.dokument-info,
.vorlage-info {
    font-size: 10px;
    font-weight: normal;
    color: var(--muted);
    margin-top: 1px;
}

.dokument-icon {
    font-size: large;
    color: var(--primary-color);
}

.verzeichnis-name {
    color: var(--primary-color);
    font-weight: bold;
    hyphens: auto;
    overflow: clip;
}

.notification-badge {
    position: absolute;
    top: -2.5px;
    right: -2.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--custom-red);
    color: white;
    font-size: 9px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.verzeichnis-item-active .verzeichnis-name {
    color: var(--menu-font-color)
}
.verzeichnis-item-active i {
    color: var(--menu-font-color)
}
.postfach-item.verzeichnis-item-active {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
}

.papierkorb-verzeichnis .postfach-item {
    border-color: var(--custom-red);
}
.papierkorb-verzeichnis .verzeichnis-name {
    color: var(--custom-red);
}
.papierkorb-verzeichnis .verzeichnis-item-active {
    background-color: var(--custom-red);
}
.papierkorb-verzeichnis .verzeichnis-item-active .verzeichnis-name {
    color: var(--menu-font-color);
}

.dokument-item-active .dokument-name {
    color: var(--menu-font-color)
}
.dokument-item-active i {
    color: var(--menu-font-color)
}
.postfach-item.dokument-item-active,
.schriftverkehr-liste-item.dokument-item-active {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    border-color: var(--primary-color);
}

.dokument-item-active .dokument-info,
.schriftverkehr-liste-item.dokument-item-active .vorlage-info {
    color: rgba(255, 255, 255, 0.75);
}

.postfach-liste {
    display: flex;
    flex-direction: column;
    margin: 0 8px 12px;
    gap: 3px;
    padding: 4px 4px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.postfach-item {
    display: grid;
    grid-template-columns: 90% 10%;
    background-color: white;
    border: 1px solid var(--background-grey2);
    border-radius: 8px;
    padding: 4px 10px;
    margin: 0;
    align-items: center;
    position: relative;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 12px;
}

#postfach-img {
    display: block;	
    margin: auto;
    max-width: 100%;
    width: auto;
}

.context-delete {
    position: absolute;
    background-color: var(--custom-red);
    color: white;
    border-radius: 10px;
    border: 1px solid black;
    z-index: 100;
    padding: 5px;
    cursor: pointer;
}
.context-delete:hover {
    background-color: var(--custom-yellow);
}

.dokument-liste-item.postfach-item {
    grid-template-columns: auto 1fr auto;
    column-gap: 8px;
}

.dokument-details {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.postfach-item input[type="checkbox"] {
    transform: scale(1.5);
}

.postfach-item:hover {
    cursor: pointer;
    background-color: var(--hover-color);
}

.schriftverkehr-header.postfach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    margin: 10px 10px 6px;
    height: auto;
    min-height: 50px;
    width: auto;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 10px;
    font-size: 13px;
    position: static;
}

.schriftverkehr-header.postfach-header .iconBtn:hover {
    background: var(--main-background);
    color: var(--primary-color);
    border-color: transparent;
}

.postfach-sidebar {
    grid-column: span 2;
    background-color: var(--main-background);
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--nav-pill-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.postfach-content {
    overflow: auto;
    background-color: var(--main-background);
    border: 1px solid var(--nav-pill-border);
    border-radius: 12px;
}

.schriftverkehr-container.postfach-container {
    gap: 8px;
}

.viewer-container {
    height: 100%;
}

.viewer-container > div {
    height: 100%;
}

.viewer-title {
    height: 25px; background-color: var(--primary-color); color: white; text-align: center; padding: 5px;
}

.pdf-toolbar {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-toolbar > span {
    height: 25px;
}

.pdf-toolbar > span i {
    cursor: pointer;
    font-size: 20px;
}

.drop-zone-dragover {
    background-color: yellow !important;
    color: var(--primary-color) !important;
}

.ma-notizen-bearbeitet-info {
    display: none;
}

.gutzeit-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-content: center;
    justify-items: center;
    margin-bottom: 5px;
}

.zpauschal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-content: center;
    justify-items: center;
    margin-bottom: 5px;
}

.zpauschal-grid input,
.gutzeit-grid input {
    width: 75px;
    text-align: center;
    font-size: inherit;
}

.gutzeit-grid input::-webkit-outer-spin-button,
.gutzeit-grid input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.kranktage-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-content: center;
    justify-items: center;
    margin-bottom: 5px;
}

.gutzeit-grid[style*="font-weight: bold"],
.kranktage-grid[style*="font-weight: bold"],
.kurzfristig-grid[style*="font-weight: bold"],
.urlaubstage-grid[style*="font-weight: bold"],
.zpauschal-grid[style*="font-weight: bold"],
.ma-urlaub-konto-header {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 5px;
    padding: 4px 6px;
}

.kurzfristig-grid,
.urlaubstage-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: center;
    justify-items: center;
    margin-bottom: 5px;
}

.ma-kinder {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.ma-kinder input {
    margin: 2.5px;
}

/***** Ausgabebereich *****/
.output_group {
    display: grid;
    grid-template-columns: 70% 30%;
    row-gap: 5px;
    align-content: baseline;
    text-align: left;
    position: relative;
}

.kosten-uebersicht {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 10px;
    height: auto;
    border-radius: 10px;
    margin-right: 10px;
    font-size: 12px;
}

.output_group > .output_value,
.result-an-sfn-std {
    text-align: right;
}

.output_label,
.output_title {
    font-weight: bold;
    text-align: left;
}

.result-details {
    background-color: var(--secondary-color);
    padding-left: 10px;
    border-radius: 6px;
    height: fit-content;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.result {
    margin-top: auto;
    display: none;
    height: auto;
    margin: 0 10px 10px;
}

.result-details > summary {
    font-weight: bold;
    padding: 4px 0;
}

.result-an-sfn-switch {
    position: absolute;
    cursor: pointer;
    top: 4px;
    right: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* Sektion = aufklappbare Karte.
   Rundungen werden per JS (updateResultSectionRadius) gesetzt: nur die erste/letzte
   sichtbare Sektion bekommt oben/unten einen Radius. Reines CSS reicht nicht, da
   Umsatz/Einmalzahlung je nach Mitarbeiter dynamisch ein-/ausgeblendet werden. */
.result-details.ov-sec {
    background: #ffffff;
    border: 1px solid var(--ov-line);
    border-radius: 0;
    box-shadow: var(--shadow-sm);
    padding-left: 0;
    overflow: hidden;
    font-size: var(--ov-fs);
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}
.result-details.ov-sec[open] {
    border-bottom: none;
}

.result-details.ov-sec.first-visible {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.result-details.ov-sec.last-visible {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.ov-sec > .ov-sec-h {
    list-style: none;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px var(--ov-pad-x);
    background: var(--ov-tint);
    font-weight: 400;
}
.ov-sec-h::-webkit-details-marker { display: none; }
.ov-sec-h:hover { background: var(--ov-tint-2); }

.ov-chev {
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    transition: transform .16s ease;
    flex-shrink: 0;
}
.ov-sec[open] > .ov-sec-h .ov-chev { transform: rotate(90deg); color: var(--ov-accent); }

.ov-sec-t {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 13px;
    white-space: nowrap;
    text-transform: uppercase;
}
.ov-sec-h .sp { flex: 1; }

.ov-tools { display: flex; align-items: center; gap: 2px; margin-left: 6px; }

/* bestehender SFN-Umschalter, als Werkzeug in der Spaltenkopfzeile umgestylt */
.ov-col-h.sfn-head { align-items: center; }
.ov-col-h .result-an-sfn-switch {
    position: static;
    top: auto;
    right: auto;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9.5px;
    font-weight: 600;
    color: var(--muted);
    background: #fff;
    border: 1px solid var(--ov-line);
    border-radius: 999px;
    padding: 2px 7px;
    transition: color .14s, box-shadow .14s;
}
.ov-col-h .result-an-sfn-switch:hover { color: var(--ov-accent); box-shadow: 0 1px 2px rgba(20, 40, 70, .12); }

/* Kopf-Chips (Zusammenfassung) */
.ov-chips { display: flex; align-items: stretch; flex-wrap: wrap; }
.ov-chip {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 14px;
    text-align: right;
    border-left: 1px solid var(--ov-line);
    min-width: 104px;
}
.ov-chip-l {
    font-size: 9.5px; font-weight: 600; letter-spacing: .03em;
    text-transform: uppercase; color: var(--ov-muted-2);
}
.ov-chip-v {
    font-size: 13px; font-weight: 700; color: var(--primary-color);
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ov-chip-v.hero { font-size: 14px; color: var(--ov-accent); }
.ov-chip-v.pos { font-size: 14x; color: var(--ov-pos); }

/* Körper + Spalten */
.ov-sec-body { padding: 2px var(--ov-pad-x) 9px; border-top: 1px solid var(--ov-line); }
.ov-cols {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
}
.ov-cols.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ov-cols.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1180px) {
    .ov-cols, .ov-cols.cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .ov-cols, .ov-cols.cols-4, .ov-cols.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ov-col {
    padding: 6px 16px 2px;
    border-left: 1px solid var(--ov-line-soft);
    min-width: 0;
}
.ov-col:first-child { padding-left: 2px; border-left: 0; }

.ov-col-h {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    padding-bottom: 4px; margin-bottom: 2px;
    border-bottom: 1px solid var(--ov-line);
}
.ov-col-h > span:first-child {
    font-size: 10px; font-weight: 700; letter-spacing: .045em;
    text-transform: uppercase; color: var(--primary-color);
}
.ov-col-hv {
    font-size: 9.5px; font-weight: 600; color: var(--ov-muted-2);
    text-transform: uppercase; letter-spacing: .03em;
}

/* Zeilen */
.ov-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    height: var(--ov-rh);
    padding: 0 4px;
    border-radius: 4px;
}
.ov-l {
    color: var(--ink); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis; flex: 1 1 auto; min-width: 0;
    font-weight: 300; text-align: left;
}
.ov-v {
    color: var(--ink); font-weight: bold; white-space: nowrap;
    font-variant-numeric: tabular-nums; flex: 0 0 auto; text-align: right;
}

.ov-row.is-total { border-top: 1px solid var(--ov-line); margin-top: 2px; }
.ov-row.is-total .ov-l { color: var(--primary-color); font-weight: 600; }
.ov-row.is-total .ov-v { color: var(--primary-color); font-weight: 700; }

.ov-row.is-hero { background: color-mix(in srgb, var(--ov-accent) 9%, #fff); margin-top: 2px; padding: 0 4px; }
.ov-row.is-hero .ov-l { color: var(--primary-color); font-weight: 700; }
.ov-row.is-hero .ov-v { color: var(--ov-accent); font-weight: 700; }

.ov-row .ov-v.neg { color: var(--ov-neg); }

/* Null-Werte (0,00 €) in Detailspalten optisch dämpfen – per JS (applyZeroMuting)
   gesetzt, da die Werte dynamisch berechnet werden. */
.ov-row.ov-zero .ov-l,
.ov-row.ov-zero .ov-v { color: var(--muted); }
.ov-row.ov-zero .ov-v { font-weight: 300; }


/**** Berichte ****/

#ma-Berichte {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    height: 100%;
    overflow: hidden;
}

.reportlist {
    grid-column: span 2;
    height: 100%;
    height: -webkit-fill-available;
    background-color: var(--main-background);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--secondary-color);
    border-radius: 16px;
    padding: 10px 8px;
    gap: 8px;
}

.reportlist > div {
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 2px 6px;
}

.reportlist .schriftverkehr-header3 {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    height: auto;
    padding: 7px 14px;
    border-radius: 10px;
    margin: 6px 0 3px;
    font-size: 13px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23273e69' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z'/></svg>");
    background-repeat: no-repeat;
    background-position: center right 12px;
}

.reportlist .schriftverkehr-header3:first-child {
    margin-top: 0;
}

.reportlist .schriftverkehr-header3.closed-header {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23273e69' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
}

.reportlist .schriftverkehr-liste-item {
    color: var(--primary-color);
    font-weight: 600;
    text-align: left;
    font-size: 12px;
    padding: 4px 12px;
    margin: 0 4px;
    border: 1px solid var(--background-grey2);
    border-radius: 8px;
    background-color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 0;
    height: auto;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
    flex: 0 0 auto;
}

.reportlist .schriftverkehr-liste-item > i {
    font-size: 15px;
    flex-shrink: 0;
}

.reportlist .schriftverkehr-liste-item:hover {
    opacity: 1;
    background-color: var(--hover-color);
}

.reportlist .schriftverkehr-liste-item.report-item-active {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    border-color: var(--primary-color);
}

.reportlist .schriftverkehr-liste-item.report-item-active:hover {
    background-color: var(--primary-color);
}

#bericht-upload-zone {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    margin: 8px 6px 4px;
    padding: 14px;
    border: 2px dashed var(--background-grey2);
    color: var(--primary-color);
    max-height: 120px;
    border-radius: 14px;
    transition: transform 0.25s ease-out;
    font-weight: bold;
    line-height: normal;
    overflow: hidden;
    background-color: white;
}

#bericht-upload-zone:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    transform: scale(0.97);
    background-color: var(--hover-color);
}

.reportarea {
    grid-column: span 8;
    overflow: auto;
    padding-left: 10px;
    line-height: normal;
    transform-origin: top left;
    height: 100%;
}

.zoomreport {
    transform-origin: left top;
    padding: 2mm;
    background-color: white;
    border-radius: 6px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: auto;
    width: fit-content;
}

.titelseite_der_berichte {
    grid-area: submenu1 / submenu1 / submenu2 / submenu2;
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.zoom {
    width: 40vw;
}

.pagination {
    align-items: center;
    justify-content: space-around;
}

.titelseite_der_berichte:hover,
.pagination:hover {
    cursor: default;
}

#report-kw-change,
#report-pagination {
    align-items: center;
    gap: 5px;
}

.tagesauswahl input {
    border-radius: 5px;
}

.error {
    color: var(--primary-color);
    animation-name: erroranimation;
    animation-duration: 20s;
}

/********************* ZEITEN **********************/
/* ===== MAIN LAYOUT ===== */
#zeiten-body {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    gap: 10px;
}

/* ===== LEFT PANEL - INPUT CONTAINER ===== */
.zeiten-input-container {
    min-width: 300px;
    max-width: 300px;
    overflow: auto;
    height: 100%;
}

.zeiten-input-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.zeiten-input-control {
    border: 1px solid var(--nav-pill-border);
    border-radius: 8px;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.zeiten-input-header {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: center;
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    padding: 4px 6px;
    gap: 6px;
    font-weight: 600;
    font-size: 14px;
}

.zeiten-input-header input[type="date"] {
    padding: 4px 6px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background-color: white;
    color: var(--ink);
    font-size: 12px;
    font-weight: bold;
}

.zeiten-input-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(calc(50% - 5px), 80px));
    gap: 4px 10px;
    padding: 6px 8px;
}

/* ===== FORM ELEMENTS ===== */
.zeiten-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.zeiten-item label {
    font-size: 12px;
    font-weight: 600;
    color: #294057;
    display: flex;
    align-items: center;
    gap: 4px;
}

.zeiten-item label i {
    font-size: 11px;
    opacity: 0.6;
    cursor: help;
}

.zeiten-item input[type="time"],
.zeiten-item input[type="date"],
.zeiten-item input[type="number"],
.zeiten-item select {
    padding: 2px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 12px;
    color: #294057;
    background-color: white;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 22px;
    width: 100%;
}

.zeiten-item input[type="time"]:focus,
.zeiten-item input[type="date"]:focus,
.zeiten-item input[type="number"]:focus,
.zeiten-item select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 64, 87, 0.1);
}

.zeiten-item textarea {
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    color: var(--ink);
    background-color: white;
    resize: vertical;
    min-height: 40px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.zeiten-item textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 64, 87, 0.1);
}

.zeiten-item input:disabled,
.zeiten-item select:disabled {
    background-color: var(--field-disabled-fill);
    border-color: var(--field-disabled-border);
    color: var(--field-disabled-color);
}

/* ===== GRID COLUMN SPANS ===== */
.zeiten-span1 {
    grid-column: span 1;
}

.zeiten-span2 {
    grid-column: span 2;
}

.zeiten-span4 {
    grid-column: span 2;
}

/* ===== BUTTONS ===== */
.zeiten-input-body button {
    padding: 4px 6px;
    background-color: white;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: normal;
}

.zeiten-input-body button:hover {
    background-color: var(--hover-color);
}

.zeiten-input-body button:active {
    transform: scale(0.98);
}

/* EGFZ BUTTONS GRID */
.egfz-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 8px;
    grid-column: span 2;
}

.egfz-buttons button {
    padding: 4px 6px;
    font-size: 12px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.2;
}

/* WEITERE FUNKTIONEN BUTTONS */
.zeiten-input-control:last-child .zeiten-input-body {
    gap: 6px 8px;
}

.zeiten-input-control:last-child button {
    text-overflow: ellipsis;
    overflow: hidden;
}

/* EXTRA SCHICHT AND OK BUTTONS */
.zeiten-input-body > .zeiten-span2:nth-last-child(-n+2) {
    grid-column: span 1;
}

.zeiten-input-body > .zeiten-span2:nth-last-child(-n+2) button {
    width: 100%;
    padding: 4px 6px;
}

/* NEUE PAUSE BUTTON */
#neue-pause-button {
    width: 100%;
    padding: 4px 8px;
}

/* ===== PAUSE SECTION ===== */
.pausen-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 10px;
    align-items: center;
}

.pausen-header > label[title] {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    gap: 4px;
    font-weight: normal;
    font-size: 12px;
    cursor: help;
}

#pausen-liste:not(:empty) {
    margin-top: 4px;
}

.pause-input {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    padding: 4px 6px;
    background-color: #f9f9f9;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 4px;
}

.pause-field,
.pause-flag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.pause-field input[type="time"] {
    width: 70px;
    padding: 2px 4px;
    height: auto;
    font-size: 12px;
}

.pause-dash {
    color: #666;
    font-weight: bold;
}

.pause-input input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    margin: 0;
}

.pause-input label {
    font-size: 12px;
    margin: 0;
    font-weight: normal;
    white-space: nowrap;
}

.pause-delete {
    margin-left: auto;
    cursor: pointer;
    color: var(--custom-red);
    display: inline-flex;
    align-items: center;
}

/* ===== RIGHT PANEL - TIME LIST ===== */
.zeiten-liste-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

#zeiten-liste {
    overflow-y: auto;
    border-right: 1px solid #ddd;
    border-left: 1px solid #ddd;
}

/* ===== ZEITEN GRID ===== */
.zeiten-grid {
    display: grid;
    grid-template-columns: repeat(4, 6vw);
    background-color: white;
    row-gap: 0;
    column-gap: 0;
    margin-right: 10px;
    line-height: 1;
    position: relative;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s ease;
}

.zeiten-grid .zeiten-item {
    font-size: 11px;
    height: 5mm;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--primary-color);
    padding: 4px;
    color: var(--ink);
}

.stempel-wrap {
    display: flex;
    align-items: center;
    gap: 1.5px;
}

.stempel-zeit {
    display: none;
    align-items: center;
    gap: 2px;
    font-size: 9px;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 1px;
    flex-shrink: 0;
}

#zeiten-liste.show-stempelzeiten .stempel-zeit {
    display: inline-flex;
}

.zeiten-item[aria-rowindex="2"] {
    border-top: 1px solid var(--primary-color);
}

/* Remove right border from last column */
.zeiten-grid .zeiten-item:nth-child(4n) {
    border-right: none;
}

/* Remove bottom border from last row */
.zeiten-grid .zeiten-item:nth-last-child(-n+4) {
    border-bottom: none;
}
/* LEGEND HEADER STYLING */
#zeiten-grid-legende .zeiten-item {
    color: var(--ink);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}
/* SPECIAL ROW COLORS */
.zeiten-item.ueberlaenge {
    color: var(--custom-red);
    font-weight: 600;
    flex-direction: row;
    justify-content: center;
    gap: 5px;
    background-color: #fff5f5;
}

.zeiten-item.ueberlaenge > i {
    font-size: 11px;
}

.zeiten-grid.egfz-gzminus > .zeiten-item:first-child {
    background: var(--custom-light-pink);
    font-weight: 600;
    color: var(--custom-red);
    border-top-left-radius: 4px;
}

.zeiten-grid.egfz-gzplus > .zeiten-item:first-child {
    background: var(--custom-orange);
    font-weight: 600;
    color: var(--custom-red);
    border-top-left-radius: 4px;
}

/* Wenn nur Zeile 1 sichtbar ist, runden wir die untere linke Ecke auch ab */
#zeiten-liste.row1-only .zeiten-grid.egfz-gzminus > .zeiten-item:first-child,
#zeiten-liste.row1-only .zeiten-grid.egfz-gzplus > .zeiten-item:first-child {
    border-bottom-left-radius: 4px;
}
.zeiten-notiz {
    position: absolute;
    top: -3px;
    right: -5px;
    text-align: center;
    font-size: small;
    line-height: normal;
    color: var(--custom-yellow);
}
/* ===== LIST ITEMS ===== */
.zeiten-list-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: white;
    padding: 2px;
    flex-wrap: wrap;
    gap: 5px 0;
    border-bottom: 1px solid #f0f0f0;
    padding-left: 25.5mm;
}

#zeiten-liste .zeiten-list-item:nth-child(odd) {
    background-color: #f9f9f9;
    color: black;
}

#zeiten-liste .zeiten-list-item.zeiten-sonntag {
    background-color: var(--secondary-color);
    color: black;
}

#zeiten-liste .zeiten-list-item.zeiten-feiertag {
    background-color: var(--custom-turquoise);
    color: black;
}

#zeiten-liste .zeiten-list-item:hover {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    cursor: pointer;
}

#zeiten-liste .zeiten-list-item.tag-selected {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
}

.zeiten-list-item .tag-urlaub {
    rotate: 45deg;
    margin-right: 5px;
    font-size: 14px;
}


/* ===== LEGEND ===== */
.zeiten-legende {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    padding-left: 25.5mm;
    border: 1px solid #ddd;
    border-radius: 8px 8px 0 0;
    border-bottom: 1mm solid var(--primary-color);
    background-color: #f9f9f9;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.zeiten-legende > span {
    width: 20mm;
    text-align: center;
    font-size: 12px;
}

.zeiten-kw {
    width: 5.5mm;
    margin-left: -25.5mm;
    padding-left: 2.5px;
    font-weight: bold;
    font-size: 12px;
    text-align: center;
}

.zeiten-tag {
    display: flex;
    justify-content: space-between;
    padding-left: 2mm;
    padding-right: 2mm;
    width: 20mm;
    font-size: 12px;
}

.zeiten-legende-auswahl {
    display: flex;
    flex-direction: column;
    margin: 0 2mm;
}

.zeiten-legende-auswahl input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.zeiten-legende-option {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 2px 4px;
    cursor: pointer;
    white-space: nowrap;
}

.zeiten-legende-option label {
    cursor: pointer;
    font-size: inherit !important;
}

/* ===== SUMMARY ===== */
#zeiten-liste-summe {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    border-top: 1mm solid var(--primary-color);
    background-color: #f9f9f9;
    line-height: normal;
    font-size: 12px;
    flex-shrink: 0;
}

#zeiten-liste-summe > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

#zeiten-liste-summe span:first-child {
    font-weight: 600;
    color: #294057;
    text-transform: uppercase;
    font-size: 11px;
}

#zeiten-liste-summe span:last-child {
    font-family: monospace;
    color: var(--brand);
}

/* ===== MAPS ===== */
#sharedMapPopup {
    position: absolute;
    width: 300px;
    height: 250px;
    z-index: 1000;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    visibility: hidden;
}

.leaflet-control-zoom.leaflet-bar.leaflet-control span {
    font-size: inherit;
}

.gps-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    color: #6b7280;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 3px;
    padding: 1px;
    flex-shrink: 0;
    cursor: pointer;
}

.zpauschal-grid > input.no-border:disabled,
.gutzeit-grid > input.no-border:disabled,
#zeiten-liste .zeiten-input,
.zeiten-select,
.zeiten-item > label {
    border: none;
    background: none;
}

/* ===== UTILITIES ===== */
.hide-focus:focus,
.hide-focus:active,
.hide-focus:focus-visible {
    border: none;
    outline: none;
}
.zeiten-item-selected {
    background: var(--hover-color);
}
.zeiten-item-selected > .zeiten-item {
    border-color: var(--primary-color);
}

.zeiten-item-loeschen {
    background-color: var(--custom-red);
}
.zeiten-item-loeschen > .zeiten-item {
    color: #fff;
}

.zeiten-select {
    border: none;
    background: none;
}

.zeiten-input {
    text-align: center;
}

.zeiten-egfz-tage {
    height: auto;
    max-height: 7mm;
    min-width: 25px;
}

.field-highlight {
    animation: field-highlight-pulse 1.5s ease 2;
    border-radius: 4px;
}

@keyframes field-highlight-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(74, 163, 223, 0.7); background-color: rgba(74, 163, 223, 0.15); }
    50%  { box-shadow: 0 0 0 6px rgba(74, 163, 223, 0); background-color: rgba(74, 163, 223, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(74, 163, 223, 0); background-color: transparent; }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 600px) {
    #zeiten-body {
        flex-direction: column;
        flex-direction: column-reverse;
    }

    .zeiten-input-container {
        min-width: 100%;
        max-width: 100%;
        min-height: auto;
        max-height: 25vh;
    }

    .zeiten-input-body {
        grid-template-columns: 1fr;
    }

    #main-zeiten-input {
        grid-template-columns: repeat(auto-fit, minmax(calc(50% - 5px), 150px));
    }

    .zeiten-span1 {
        grid-column: span 1;
    }

    .zeiten-span2 {
        grid-column: span 1;
    }

    .zeiten-span4 {
        grid-column: span 2;
    }

    .egfz-buttons {
        grid-template-columns: 1fr;
        grid-column: span 1;
    }

    .egfz-buttons button {
        width: 100%;
    }

    .zeiten-input-control:last-child .zeiten-input-body {
        flex-direction: column;
    }

    .zeiten-input-control:last-child button {
        width: 100%;
    }

    .zeiten-input-body > .zeiten-span2:nth-last-child(-n+2) {
        grid-column: span 1;
    }

    .zeiten-input-body > .zeiten-span2:nth-last-child(-n+2) button {
        width: 100%;
    }
}

/********************* Tagesübersicht **********************/
.tu-body {
    font-size: 14px;
}

.tu-list-body {
    width: 70%;
}

.tu-list-header {
    padding-left: 10px;
    padding-top: 5px;
    display: flex;
    width: 100%;
    gap: 5px;
}

.tu-header-status {
    border: 1.5px solid;
}

.tu-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow: auto;
    padding: 4px;
}

.tu-hover-pausen:hover {
    position: relative;
}
.tu-hover-pausen:hover .tu-pausen-info {
    display: block;
}

.tu-pausen-info {
    display: none;
    position: absolute;
    left: 33%;
    z-index: 10;
    width: max-content;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: black;
    padding: 5px 5px 5px 20px;
    background-color: var(--nav-pill);
    margin: 0;
}

.tu-pausen-info li {
    list-style: decimal;
}

.tu-header-status {
    border-radius: 5px;
    padding: 0 5px;
}

.tu-header-status:hover {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
}

.tu-filter-item .tu-filter-parent:hover,
.tu-filter-item .tu-filter-child:hover {
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
}

.tu-filter-status-active {
    text-shadow: 0.5px 0.5px black;
    font-weight: bold;
    color: white;
}

.tu-filter-title {
    padding-left: 5px;
    margin: 5px 5px 0px;
    font-weight: bold;
}

.tu-filter-parent {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    padding: 4px 6px;
    margin: 5px;
    margin-bottom: 2.5px;
    border: 1.5px solid var(--nav-pill-border);
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;	
    background-repeat: no-repeat;
    background-position: center right 2.5px;
    background-image: url('./icons/chevron-down-white.svg');
}

.tu-filter-parent-input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: auto;
    margin-right: 18px;
    accent-color: var(--secondary-color);
}

.tu-filter-parent-open {
    background-image: url('./icons/chevron-up-white.svg');
}

.tu-filter-child {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    padding: 0 5px;
    margin: 2.5px 5px;
    border: 1.5px solid var(--nav-pill-border);
    border-radius: 5px;
    background-color: var(--secondary-color);
    margin-right: 25px;
    color: var(--primary-color);
}
.tu-filter-child.hidden {
    display: none;
}
.tu-filter-child-input[type="checkbox"] {
    width: 14px;
    height: 14px;
}

/********************* Monatsuebersicht **********************/
.rotate45 {
    transform: rotate(45deg);
}

/********************* Verwaltung **********************/
.accordion {
    background-color: var(--main-background);
    width: 100%;
    padding: 14px 22px;
    text-align: left;
    border: 1px solid var(--nav-pill-border);
    outline: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink);
    background-image: url('./icons/chevron-down.svg');
    background-repeat: no-repeat;
    background-position: center right 18px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(20, 40, 70, 0.10);
    margin: 14px 0 0;
    transition: border-radius 0.15s ease, box-shadow 0.15s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.accordion > i {
    line-height: 1;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
}

.accordion:first-of-type {
    margin-top: 0;
}

/* Wrappers around accordion+panel pairs (e.g. each Betriebsstätte) also need card spacing */
.bs-panel-container,
.eo-panel-container {
    margin-top: 14px;
}
.bs-panel-container:first-child,
.eo-panel-container:first-child {
    margin-top: 0;
}

.accordion.active {
    background-image: url('./icons/chevron-up.svg');
    border-radius: 10px 10px 0 0;
    border-color: rgba(20, 40, 70, .18);
    border-bottom-color: transparent;
    margin-bottom: 0;
    box-shadow: 0 -3px 3px -1px rgba(20, 40, 70, 0.08);
    background-color: var(--nav-pill);
}

.accordion:hover {
    background-color: var(--nav-pill);
    box-shadow: 0 4px 14px rgba(20, 40, 70, 0.14);
    cursor: pointer;
}
.accordion.active:hover {
    box-shadow: 0 -3px 3px -1px rgba(20, 40, 70, 0.08);
}

.panel {
    background-color: var(--nav-pill);
    border: 1px solid rgba(20, 40, 70, .18);
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 20px rgba(20, 40, 70, 0.14);
    /* clip the upward bleed of the shadow so there's no seam against the accordion button */
    clip-path: inset(0 -30px -30px -30px);
    padding: 0px 6px;
}
.panel.hidden {
    display: none;
}

/* Lohnarten panels hold very long lists — cap their height and give each its own
   scroll, so two panels can be open at once and scrolled independently (instead of
   growing the whole page). Scoped via .lohnarten-liste, which only exists here. */
.panel:has(.lohnarten-liste) {
    max-height: 45vh;
    overflow: auto;
}

.panel .fieldset-grid {
    padding: 6px 2px;
}

/* Stammdaten accordion cards: deeper legend tint to set the header off from
   the white card body. */
.vw-container fieldset > legend {
    background: var(--main-background);
}

/* Dashed "ghost card" CTA — sits at the end of the card list */
.accordion-create {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 14px 22px;
    margin-top: 14px;
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    outline: none;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.accordion-create > i,
.accordion-create > .plus-icon {
    font-size: 16px;
    margin: 0;
}

.accordion-create:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
}

.checkbox-feiertag {
    width: 20%;
}

.bs-input-notiz-section {
    display: flex;
    flex-direction: column;
}

.bs-input-notiz-section > button {
    margin: 10px auto;
}

.bereiche-list-grid, .bereiche-liste {
    display: grid;
    grid-template-columns: 1fr 1fr 0.5fr;
    grid-auto-rows: min-content;
    column-gap: 5px;
    row-gap: 2px;
    align-content: center;
}

.bereiche-liste {
    grid-column: span 3;
}

.posten-list-grid, .posten-liste {
    display: grid;
    grid-template-columns: 0.66fr 0.66fr 0.66fr 0.5fr;
    grid-auto-rows: min-content;
    column-gap: 5px;
    row-gap: 2px;
}

.fieldset3columns label {
    text-overflow: ellipsis;
    overflow: hidden;
}

.fieldset-div:hover, .fieldset-checkbox-div:hover {
    background: rgba(218, 232, 244, .45);
    border-radius: 5px;
}

.posten-liste {
    grid-column: span 4;
}

.posten-list-grid input[type="text"],
.bereiche-list-grid input[type="text"] {
    width: auto;
}

.bereiche-liste input,
.posten-liste input,
.posten-liste select {
    width: 100%;
    background-color: white;
    min-width: 0;
}

.bereiche-liste input[type="checkbox"],
.posten-liste input[type="checkbox"] {
    width: auto;
    margin: auto;
}

.liste-zeile p, 
.liste-zeile input,
.liste-zeile select,
.liste-zeile button {
    text-align: center;
    overflow: hidden;
    hyphens: auto;
    width: 100%;
    margin: auto;
    white-space: break-spaces;
    height: 18px;
    font-size: inherit;
}

.liste-zeile input,
.liste-zeile input[type="number"],
.liste-zeile input[type="text"],
.liste-zeile input[type="date"],
.liste-zeile select {
    background-color: var(--main-background);
    border-radius: 4px;
}

.liste-zeile select:disabled,
.liste-zeile input:disabled {
    background-color: var(--nav-pill);
    border: none;
    color: var(--ink);
    font-weight: bold;
    background-color: transparent;
}

.liste-zeile select:disabled {
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    padding-right: 0;
}
.liste-zeile select:disabled::-ms-expand {
    display: none;
}

.liste-zeile button {
    width: auto;
    min-width: 36px;
    padding: 2px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.liste-zeile button > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
/* Centre the button inside its bare <div> wrapper grid cell.
   :only-child keeps multi-control wrappers like .ma-qu-tools untouched. */
.liste-zeile > div:has(> button:only-child) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.liste-zeile {
    text-align: center;
    display: grid;
    align-items: center;
    column-gap: 2.5px;
    padding: 1px 2px;
    border: 1px solid transparent;
    border-radius: 6px;
}
.liste-zeile.header,
.liste-zeile:last-child {
    line-height: normal;
    align-items: center;
}

.liste-zeile.header p {
    height: auto;
    line-height: 1.15;
}

.panel .liste-zeile:nth-child(2n) {
    background: var(--main-background);
}

.liste-zeile:not(.header):hover {
    background-color: var(--hover-color);
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    color: var(--basic-font-color);
}

.lohnarten-liste {
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.lohnarten-liste > button {
    border: none;
    outline: none;
    width: fit-content;
    background-color: var(--custom-green);
    color: var(--menu-font-color);
    padding: 5px;
    font-weight: bold;
    margin-top: 5px;
    border-radius: 6px;
}

.lohnarten-liste > button:hover {
    opacity: 70%;
    cursor: pointer;
}

.historie-liste > .header {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    position: sticky;
    z-index: 10;
    top: 0px;
    border-radius: 0;   
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    align-items: stretch;
    padding-top: 4px;
    padding-bottom: 4px;
}

.historie-liste > .header > p,
.historie-liste > .header > div {
    height: auto;
    min-height: 18px;
    overflow: visible;
    /* grid (not flex) so each header's own text-align governs horizontal alignment,
       letting the headers line up with their data columns (numbers right, labels centered) */
    display: grid;
    align-items: center;
}

.historie-liste > .header .ma-jh-auk-tage,
.historie-liste > .header .ma-jh-aug-std {
    display: grid;
    align-items: center;
}

.lohnarten-liste > .header {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 30px;
    border-radius: 6px;
}

.qu-zeile, .eo-zeile {
    grid-template-columns: repeat(10, 1fr);
}

.quali-beschreibung-button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 18px;
    padding: 0;
    align-self: center;
    justify-self: center;
}
.quali-beschreibung-button:hover {
    opacity: 0.7;
}
.quali-beschreibung-button.has-beschreibung {
    color: var(--custom-green);
    align-items: normal;
}
.quali-beschreibung-button.has-beschreibung::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--custom-green);
    vertical-align: top;
    margin-left: 1px;
}

#quali-beschreibung-dialog {
    min-width: 50vw;
}
#quali-beschreibung-editor {
    text-align: left;
    min-width: 45vw;
}

.nba-zeile {
    grid-template-columns: 1fr 1fr 1fr 1.5fr 1fr 1fr 1fr 1fr .5fr 1fr;
}

.lag-zeile, .kk-zeile {
    grid-template-columns: 0.5fr 2fr 1fr 1fr 1fr;
}

.bw-zeile {
    grid-template-columns: 2fr 1fr 1fr 2fr 2fr 1.5fr .5fr;
}

.bdp-zeile, .la-zeile {
    grid-template-columns: .5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr .5fr .5fr;
}

/* Hide the FiBu Konto column in the BDP list (HTML retained) */
.bdp-zeile {
    grid-template-columns: .5fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr .5fr;
}
.bdp-zeile > p:nth-child(9),
.bdp-zeile > input[aria-label="bdp-FiBuKonto"] {
    display: none;
}

.la-export {
    display: grid;
    grid-template-columns: 0.5fr 0.5fr;
}
.nba-export {
    display: grid;
    grid-template-columns: 0.5fr 0.25fr 0.25fr;
}
.la-export input,
.nba-export input {
    width: 100%;
}

.liste-zeile input[type="checkbox"] {
    margin: 2.5px;
    max-height: 20px;
}

.pausen-liste {
    margin: 6px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: nowrap;
}

.pausen-zelle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.pausen-label,
.pausen-einheit {
    color: var(--muted);
}

label.pausen-zelle {
    cursor: pointer;
}

.pausen-remove {
    display: inline-flex;
    align-items: center;
    color: var(--custom-red);
    cursor: pointer;
}
.pausen-remove:hover {
    opacity: 0.7;
}

.pausen-liste input[type="number"] {
    max-width: 60px;
}

.pausen-liste input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.pausen-liste input {
    text-align: right;
}

.pausenmodell-extra-pause {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--menu-font-color);
    width: 100%;
    transition: transform 0.33s ease-in-out;
}
.pausenmodell-extra-pause:hover {
    opacity: 70%;
    cursor: pointer;
    transform: scale(0.975);
}

.verwenden-button,
.entfernen-button {
    border-radius: 5px;
    width: fit-content;
    color: var(--menu-font-color);
}

.verwenden-button {
    background-color: var(--custom-green);
    border: 1px solid var(--custom-green);
}

.entfernen-button {
    background-color: var(--custom-red);
    border: 1px solid var(--custom-red);
}

.entfernen-button:hover,
.verwenden-button:hover {
    opacity: 70%;
    cursor: pointer;
}

input.spalte-bezeichnung {
    text-align: left;	
}

.spalte-bezeichnung {
    grid-column: span 2;
}

.spalte-rollen {
    display: flex;
    width: 100%;
    gap: 2.5px;
}
.spalte-rollen > input {
    width: 100%;
}

.notiz-input {
    height: 100%;
    width: 100%;
    border-radius: 5px;
}

.schriftverkehr-container {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    height: 100%;
}

.nachrichten-list {
    height: 100%;
    overflow: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nachricht-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-width: 75%;
    border-radius: 12px;
}

.nachricht-employee {
    margin-right: auto;
    align-items: flex-start;
}

.nachricht-owner {
    margin-left: auto;
    align-items: flex-end;
}

.nachricht-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--basic-font-color);
    flex-wrap: wrap;
}

.nachricht-badge {
    letter-spacing: 0.5px;
    font-size: 12px;
    padding: 0px 5px;
    font-weight: bold;
    color: var(--basic-font-color);
}

.nachricht-owner .nachricht-badge {
    color: var(--primary-color);
}

.nachricht-author {
    font-weight: bold;
}

.nachricht-time {
    color: var(--grey-font-color);
}

.nachricht-text {
    width: 100%;
    padding: 10px;
    border-radius: 5px 10px;
    border: 1px solid var(--background-grey2);
    background-color: var(--background-grey);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nachricht-owner .nachricht-text {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.nachricht-revoke {
    margin-left: 8px;
    color: var(--custom-red);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.nachricht-revoke:hover {
    opacity: 0.8;
}

.nachricht-deleted {
    font-style: italic;
}

.nachricht-owner .nachricht-deleted {
    color: var(--background-grey);
}

.nachricht-employee .nachricht-deleted {
    color: var(--grey-font-color);
}

.nachricht-empty {
    text-align: center;
    padding: 12px;
    background-color: var(--background-grey);
    border: 1px dashed var(--background-grey2);
    border-radius: 10px;
    color: #6b7280;
}

.nachrichten-footer {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
}

.nachrichten-input {
    flex: 1;
    min-height: 40px;
    border-radius: 8px;
    border: 1px solid var(--background-grey2);
}

.nachrichten-input:focus {
    border-color: var(--primary-color);
}

.nachrichten-send-btn {
    height: 40px;
    width: 60px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.schriftverkehr-sidebar {
    grid-column: 1 / 3;
    height: 100%;
    overflow: auto;
    background-color: var(--bg);
}

.schriftverkehr-editor {
    grid-column: 3 / 9;
    height: 100%;
    display: inline-flex;
    flex-direction: column;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-bottom: none;
}

#vw-schriftverkehr.schriftverkehr-container {
    gap: 8px;
}

#vw-schriftverkehr .schriftverkehr-sidebar,
#vw-schriftverkehr .schriftverkehr-editor,
#vw-schriftverkehr .schriftverkehr-variablen {
    border: 1px solid var(--nav-pill-border);
    border-radius: 12px;
}

#vw-schriftverkehr .schriftverkehr-editor {
    overflow: hidden;
    background-color: var(--main-background);
}

#vw-schriftverkehr .schriftverkehr-sidebar {
    overflow: auto;
    background-color: var(--main-background);
}

#vw-schriftverkehr .schriftverkehr-variablen {
    overflow: hidden;
    background-color: var(--main-background);
    display: flex;
    flex-direction: column;
}

/* Section group headers (Uploads, Vorlagen, Mustervorlagen, Feste/Weitere Textmarken)
   styled as light-blue pills matching ma_postfach. */
#vw-schriftverkehr .schriftverkehr-header2 {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    height: auto;
    line-height: normal;
    padding: 10px 16px;
    margin: 10px 10px 6px;
    width: auto;
    border-radius: 10px;
    font-size: 13px;
    text-align: left;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23273e69' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M7.646 4.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1-.708.708L8 5.707l-5.646 5.647a.5.5 0 0 1-.708-.708l6-6z'/></svg>");
    background-position: center right 14px;
}

#vw-schriftverkehr .schriftverkehr-header2.closed-header {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%23273e69' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    margin-bottom: 6px;
}

/* Folder / sub-section accordion headers (Eigene Vorlagen, Papierkorb, dynamic ordner) */
#vw-schriftverkehr .schriftverkehr-header3 {
    margin: 4px 10px;
    border-radius: 8px;
    height: auto;
    padding: 6px 12px;
    font-size: 12px;
    width: auto;
}

/* List items inside sidebar and variablen */
#vw-schriftverkehr .schriftverkehr-liste-item {
    border: 1px solid var(--background-grey2);
    border-radius: 8px;
    padding: 6px 10px;
    margin: 0 14px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 12px;
    text-align: left;
    background-color: white;
    display: flex;
    align-items: center;
    gap: 8px;
}

#vw-schriftverkehr .schriftverkehr-liste-item .vorlage-info {
    margin-left: auto;
    text-align: right;
}

#vw-schriftverkehr .schriftverkehr-liste-item.dokument-item-active {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    border-color: var(--primary-color);
}

#vw-schriftverkehr .schriftverkehr-liste-item:hover {
    opacity: 1;
    background-color: var(--hover-color);
    cursor: pointer;
}

#vw-schriftverkehr .schriftverkehr-liste-item.dokument-item-active:hover {
    background-color: var(--primary-color);
}

#vw-schriftverkehr .dokument-liste-item.postfach-item {
    margin: 0 14px;
}

#vw-schriftverkehr .schriftverkehr-sidebar .schriftverkehr-liste {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 2px 0;
    margin: 2px 0 6px;
}

#vw-schriftverkehr .schriftverkehr-variablen > .schriftverkehr-liste {
    background: transparent;
    padding: 6px 10px;
    gap: 6px;
    overflow-y: auto;
    flex: 1 1 0;
    min-height: 0;
    align-content: flex-start;
}

#vw-schriftverkehr .schriftverkehr-variablen .schriftverkehr-liste-item {
    border-radius: 999px;
    margin: 0;
    padding: 4px 12px;
}

#vw-schriftverkehr .schriftverkehr-liste-item.schriftverkehr-neu-btn {
    margin: 6px 10px;
    border-color: var(--custom-circle-green);
    color: var(--custom-circle-green);
}

.viewer-container.schriftverkehr-viewer {
    height: calc(100% - 145px);
}

.schriftverkehr-variablen {
    grid-column: 9 / 11;
    height: 100%;
    overflow: auto;
}


.schriftverkehr-header {
    background-color: var(--primary-color);
    color: var(--menu-font-color);
    font-weight: bold;
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
}

.schriftverkehr-header2 {
    background-color: var(--custom-blue);
    color: var(--menu-font-color);
    font-weight: bold;
    height: 45px;
    width: 100%;
    text-align: center;
    line-height: 45px;
    background-repeat: no-repeat;
    background-position: center right 10px;
    background-image: url('./icons/chevron-up-white.svg');
}

.schriftverkehr-header3:hover,
.schriftverkehr-header2:hover {
    cursor: pointer;
    opacity: 0.75;
}

.schriftverkehr-header2.closed-header,
.schriftverkehr-header3.closed-header {
    background-repeat: no-repeat;
    background-position: center right 10px;
    background-image: url('./icons/chevron-down-white.svg');
    margin-bottom: .5mm;
}

.schriftverkehr-header3 {
    background-color: var(--custom-blue);
    color: var(--menu-font-color);
    height: 7mm;
    width: 100%;
    display: flex;
    align-items: center;
    font-weight: bold;
    padding-left: 10px;
    gap: 5px;
    background-repeat: no-repeat;
    background-position: center right 10px;
    background-image: url('./icons/chevron-up-white.svg');
}

#papierkorb-vorlagen {
    background-color: var(--custom-red);
}

.schriftverkehr-header-title {
    font-weight: bold;
    height: 45px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--secondary-color);
    color: var(--basic-font-color);
    column-gap: 5px;
}

.schriftverkehr-header-title > input {
    border: none;
    padding: 5px;
    border-radius: 5px;
    font-weight: bold;
    font-size: inherit;
    width: 100%;
    margin: 12px;
    text-align: center;
}

.schriftverkehr-liste {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 2.5px;
}

.schriftverkehr-variablen .schriftverkehr-liste-item {
    padding: 0 5px;
}

#schriftverkehr-dokumente .schriftverkehr-liste-item {
    text-align: left;
    padding-left: 10px;
    hyphens: auto;
    line-height: 1;
}

.schriftverkehr-liste-item.schriftverkehr-neu-btn {
    display: flex;
    background-color: var(--custom-green);
    color: var(--menu-font-color);
    align-items: center;
    justify-content: center;
    font-weight: bold;
    padding: 0;
    height: 25px;
}

.schriftverkehr-liste-item {
    background-color: white;
    margin: 2.5px;
    padding: 1px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--background-grey2);
    overflow: hidden;
    text-overflow: ellipsis;
}
.schriftverkehr-liste-item:hover {
    cursor: pointer;
    opacity: 70%;
}

.schriftverkehr-editor-content {
    width: -webkit-fill-available;
    width: -moz-available;
}

.schriftverkehr-footer {
    height: 50px;
    background-color: var(--secondary-color);
    color: var(--basic-font-color);
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
}

.schriftverkehr-footer > button:hover {
    opacity: 70%;
    cursor: pointer;
}

.schriftverkehr-footer > #mustervorlage-hinweis {
    text-align: justify;
    font-size: 9px;
    line-height: normal;
    max-width: 80%;
}

.schriftverkehr-variablen > .schriftverkehr-liste {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    font-size: small;
    background: var(--bg);
}

#editor.uneditable {
    cursor: text;
}

#editor * {
    font-family: Arial, sans-serif;
    user-select: auto;
    -moz-user-select: auto;
}

#editor p {
    text-align: justify;
    white-space: pre-line;
    font-size: 12px;
}

/* Override for Firefox, in Firefox werden Leertasten eliminiert aufgrund dieser property */
@-moz-document url-prefix() {
    #editor p {
        white-space: unset;
    }
}

#editor li, #editor th, #editor td {
    font-size: 12px;
}

#editor h1 { font-size: 24px; }
#editor h2 { font-size: 22px; }
#editor h3 { font-size: 20px; }
#editor h4 { font-size: 18px; }
#editor h5 { font-size: 16px; }
#editor h6 { font-size: 14px; }

#editor del {
    color: inherit;
    text-decoration: underline;
}

#editor .toastui-editor-contents table th {
    background-color: white;
    color: black;
    font-weight: bold;
}

#editor .toastui-editor-contents table th > p {
    color: black;
}

#editor .bi-blockquote-left {
    background-image: none;
    font-size: 24px;
}


/* Responsive */
@media (max-width: 1500px) {
    .topbar {
        gap: 6px;
    }
    .topbar > .tab {
        max-width: 150px;
    }

    .topbar .chip {
        padding: 0 4px;
    }
    
    .zeiten-grid {
        grid-template-columns: repeat(4, 1fr);   
    }

    :root {
        --sidebar-w: min(22%, 240px);
    }
    .sidebar {
        padding: 4px;
    }
    .ma-control .ma-control-name {
        font-size: 11px;
    }
    .ma-control .pgs-pnr {
        font-size: 9px;
    }
    .ma-control .ma-control-icons {
        font-size: 11px;
    }
    .liste-zeile p, 
    .liste-zeile input,
    .liste-zeile select,
    .liste-zeile button {
        font-size: 10px;
        height: 16px;
    }
}

@media (max-width: 1100px) {
    .iconStack {
        min-width: 0;
    }
    .neoChecker {
        display: none;
    }
}

@media (max-width: 920px) {
    body {
        overflow: auto;
    }

    .app {
        grid-template-columns: 1fr;
        grid-template-rows: 50px 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid rgba(20, 40, 70, .06);
        overflow: visible;
    }

    .fieldset6columns {
        grid-column: span 1;
    }
    #sidebar-toggle-menu {
        display: grid;
        margin: 0 10px;
        align-items: center;
        position: static;
        grid-template-columns: 100px 1fr auto;
        gap: 10px;
    }
    #sidebar-toggle-menu > img,
    #sidebar-toggle-title {
        display: block;
    }
    #sidebar-toggle-title {
        font-weight: bold;
        color: var(--ink);
    }
    .sidebar-toggle-actions {
        justify-content: flex-end;
    }
    aside.sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        min-width: min(300px, 80vw);
        max-width: 80vw;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
    }

    aside.sidebar.open {
        transform: translateX(0);
        background: var(--bg);
    }

    .sidebar-toggle {
        display: grid;
        margin-left: auto;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .brandRow {
        min-height: 0px;
    }

    .mainform {
        overflow: scroll;
    }

    .bottomCard {
        position: static;
        margin-top: 12px;
    }

    #malist {
        height: auto;
        max-height: calc(100% - 400px);
        min-height: 90px;
    }

    .topbar {
        flex-wrap: wrap;
        height: auto;
        padding-bottom: 12px;
        width: calc(100% - 60px);
    }

    .tabs {
        flex-wrap: wrap;
    }

    .main-container {
        height: auto;
    }

    .result-details > summary {
        padding-right: 75px;
    }
    .kosten-uebersicht {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .schriftverkehr-variablen {
        display: none;
    }
    #vw-schriftverkehr.schriftverkehr-container {
        grid-template-columns: repeat(8, 1fr);
        font-size: 9px;
    }
    .schriftverkehr-footer > #mustervorlage-hinweis {
        font-size: 7px;
        max-width: 90%;
    }
    header {
        width: 100dvw;
    }
    header.header-minimized .topbar,
    header.header-minimized .iconStack {
        display: none;
    }
}

@media (max-width: 600px) {
    .iconStack {
        max-width: 60px;
        flex-direction: column-reverse;
        gap: 4px;
    }
    .zeiten-grid {
        grid-template-columns: repeat(4, 50px);   
    }
    #zeiten-grid-legende .zeiten-item {
        font-size: 8px;
    }
    #zeiten-legende {
       gap: 0; 
    }
    #zeiten-liste-summe span:first-child {
        font-size: 9px;
    }
    #zeiten-liste-summe {
        font-size: 10px;
    }
    .topbar {
        padding-bottom: 0;
        gap: 4px;
    }
    *::-webkit-scrollbar {
        width: 3px;
        height: 3px;
    }
}

/* Positionierung und Größe von Elementen (nur die Schriftgröße ist in font.css) */
@media print {
	.title,
	.topmenu,
	.submenu,
	#malist,
	#malist *,
	#mafilter,
	#mafilter *,
	#reportlist,
	#reportlist *,
	input,
	#nachrichten-feed,
    .iconStack,
	.cricleBtn,
    .sidebar,
	.hide-print {
		display: none !important;
	}

    * {
        box-shadow: none !important;
    }
    body {
        background-color: white;
    }
    .app {
        display: block;
    }
    *::-webkit-scrollbar {
        display: none;
    }

    #ma-Berichte {
        display: block;
    }
    .main-container {
        margin: 0;
        padding: 0;
    }
}

/********************* Quick Info Mitarbeiter — Profilbild / Avatar **********************/
.ma-avatar-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 4px 6px 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--secondary-color);
}

.ma-avatar {
    position: relative;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(40, 60, 110, .22);
}

.ma-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

/* Initialen-Fallback, wenn kein Foto hinterlegt ist.
   --ma-avatar-bg/-fg werden im JS deterministisch aus dem Namen gesetzt. */
.ma-avatar-initialen {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .3px;
    line-height: 1;
    background: var(--ma-avatar-bg, var(--secondary-color));
    color: var(--ma-avatar-fg, var(--primary-color));
}

.ma-avatar.has-foto .ma-avatar-img {
    display: block;
}

.ma-avatar.has-foto .ma-avatar-initialen {
    display: none;
}

.ma-avatar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ma-avatar-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    line-height: 1.2;
}

.ma-avatar-rolle,
.ma-avatar-beschaeftigung {
    font-size: 11px;
    color: var(--muted);
    margin-top: 1px;
}

.ma-avatar-beschaeftigung:empty {
    display: none;
}

/* Beschäftigungszeile: aktuelle Beschäftigungsart + Wechsel-Button/Status zusammengefasst */
.ma-beschaeftigung-cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

/* Leere Einzelwerte in der Quick-Info mit Gedankenstrich kennzeichnen
   (Werte sind per Default leere Strings -> :empty). Trifft nur Einzelwert-Zellen,
   nicht zusammengesetzte Felder wie Adresse oder Beitragsgruppenschlüssel. */
.ma-quickinfo .fieldset-div > [aria-label]:empty::after,
.ma-quickinfo .fieldset-div > div > [aria-label]:only-child:empty::after {
    content: "–";
    color: var(--muted);
}
