*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: #ffffff;
    color: #000000;
    font-family: 'Conv_Dunant-Regular', Arial, sans-serif;
    font-size: 18px;
    overflow: hidden;
}

/* ---- Fixed Header ---- */
.page-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 36px;
    background: #ffffff;
    border-bottom: 5px solid #B70E0C;
    height: 90px;
}

.page-header h1 {
    margin: 0;
    font-size: 1.6em;
    color: #B70E0C;
    white-space: nowrap;
}

.logo {
    height: 64px;
    width: auto;
}

/* ---- Ticker Area ---- */
.ticker-wrap {
    position: fixed;
    top: 90px;
    bottom: 56px;
    left: 0;
    right: 0;
    overflow: hidden;
}

/*
 * KEY: width:max-content lets the track grow wider than the viewport.
 * The two .ticker-segment copies sit side by side.
 * @keyframes animates from 0 to -50% of the track's own width,
 * which equals exactly one segment – perfectly seamless.
 */
.ticker-track {
    display: flex;
    flex-direction: row;
    width: max-content;
    height: 100%;
}

@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.ticker-segment {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
    padding: 24px 14px;
    height: 100%;
    flex-shrink: 0;
}

/* ---- Day Column ---- */
.day-col {
    display: flex;
    flex-direction: column;
    width: 420px;
    flex-shrink: 0;
    height: 100%;
}

.day-header {
    font-size: 2.4em;
    font-weight: bold;
    color: #B70E0C;
    border-bottom: 4px solid #B70E0C;
    padding-bottom: 10px;
    margin-bottom: 18px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- Shifts ---- */
.shifts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: hidden;
}

.shift-block {
    position: relative;
    border: 3px solid #000000;
    border-radius: 6px;
    padding: 16px 20px;
    background: #ffffff;
}

.shift-time {
    font-size: 2em;
    color: #B70E0C;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 6px;
}

.shift-resource {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.shift-type {
    position: absolute;
    top: 10px;
    right: 14px;
    display: inline-block;
    background: #B70E0C;
    color: #ffffff;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.78em;
    font-weight: normal;
}

.role-list {
    margin: 0;
    padding-left: 22px;
}

.role-list li {
    font-size: 1.15em;
    line-height: 1.7;
    color: #000000;
}

/* ---- Bottom Bar (Uhr rechts unten) ---- */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: #ffffff;
    border-top: 2px solid #000000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 32px;
    z-index: 200;
}

.clock {
    font-size: 2.2em;
    color: #B70E0C;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

/* ---- Dienstwunsch-Box ---- */
.pref-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
    flex-shrink: 0;
}

.pref-item {
    display: block;
    background: #fff3cd;
    border: 2px solid #B70E0C;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1em;
    color: #000000;
}

.pref-item strong {
    color: #B70E0C;
}

/* ---- Error / Empty ---- */
.error {
    color: #ffffff;
    background: #B70E0C;
    border-radius: 6px;
    padding: 24px 28px;
    font-size: 1.3em;
}

.empty-msg {
    font-size: 4em;
    color: #B70E0C;
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    margin: 0;
}