:root {
    --bg: #f4f6f4;
    --surface: #ffffff;
    --surface-2: #eef4f1;
    --line: #d7dfda;
    --ink: #1f2b27;
    --muted: #68766f;
    --accent: #176b5c;
    --accent-2: #a9472b;
    --warn: #f4ead9;
    --danger: #a43535;
    --good: #2f7b44;
    --shadow: 0 1px 2px rgba(18, 31, 25, .08);
}

* {
    box-sizing: border-box;
}

html {
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body {
    margin: 0;
}

button,
.button,
input,
select {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}

h1,
h2,
p {
    margin: 0;
}

h1 {
    font-size: 20px;
    line-height: 1.2;
}

h2 {
    font-size: 16px;
}

.topbar p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.tab,
button,
.button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    color: var(--ink);
    background: var(--surface);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

button:hover,
.button:hover {
    border-color: var(--accent);
}

.tab {
    border-color: transparent;
    background: transparent;
}

.tab.active {
    color: #fff;
    background: var(--accent);
}

main {
    padding: 18px 22px 30px;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.toolbar,
.panel-title,
.actions {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
}
.work-sticky-summary {
    position: sticky;
    top: calc(var(--topbar-height, 72px) - 1px);
    z-index: 8;
    margin: -18px -22px 12px;
    padding: 18px 22px 4px;
    background: var(--bg);
}

.work-sticky-summary .toolbar {
    margin-bottom: 12px;
}

.work-sticky-summary .metrics {
    margin-bottom: 0;
}
.stamp-button {
    border-color: #b8cec7;
    background: #eef7f4;
    color: var(--accent);
    font-weight: 700;
}

.stamp-button:hover {
    border-color: var(--accent);
    background: #dceee9;
}

.stamp-button:disabled {
    cursor: wait;
    opacity: .65;
}


label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 5px 8px;
    color: var(--ink);
    background: #fff;
}

input:focus,
select:focus {
    outline: 2px solid rgba(23, 107, 92, .18);
    border-color: var(--accent);
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.metric {
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.metric strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.metric.good strong {
    color: var(--good);
}

.metric.bad strong {
    color: var(--danger);
}

.table-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    min-width: 1060px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 7px 8px;
    text-align: left;
    vertical-align: middle;
    font-size: 13px;
}

.data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: var(--muted);
    background: #f9faf9;
    font-size: 11px;
    text-transform: uppercase;
}

.data-table tr.weekend {
    background: #f8f1ed;
}

.data-table tr.holiday {
    background: var(--warn);
}

.data-table tr.saved {
    background: #edf7ef;
}

.data-table input,
.data-table select {
    min-width: 78px;
    min-height: 30px;
    padding: 3px 6px;
}

.data-table .note-input {
    min-width: 210px;
}

#workTable {
    min-width: 1120px;
}

#workTable th:nth-child(1),
#workTable td:nth-child(1) {
    width: 48px;
}

#workTable th:nth-child(2),
#workTable td:nth-child(2) {
    width: 108px;
}

#workTable th:nth-child(3),
#workTable td:nth-child(3) {
    width: 150px;
}

#workTable th:nth-child(4),
#workTable td:nth-child(4),
#workTable th:nth-child(5),
#workTable td:nth-child(5) {
    width: 86px;
}

#workTable th:nth-child(6),
#workTable td:nth-child(6) {
    width: 70px;
}

#workTable th:nth-child(7),
#workTable td:nth-child(7) {
    width: 180px;
}

#workTable th:nth-child(8),
#workTable td:nth-child(8),
#workTable th:nth-child(9),
#workTable td:nth-child(9),
#workTable th:nth-child(10),
#workTable td:nth-child(10) {
    width: 76px;
}

#workTable .time-input {
    width: 90px;
    min-width: 90px;
}

#workTable .pause-input {
    width: 58px;
    min-width: 58px;
}

#workTable .code-input {
    width: 168px;
    min-width: 168px;
}

#workTable .note-input {
    width: 100%;
    min-width: 320px;
}

#workTable .row-actions {
    text-align: center;
    white-space: nowrap;
}

#workTable .row-delete {
    min-height: 28px;
    padding: 0 8px;
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-size: 15px;
    line-height: 1;
}

#workTable .row-delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.data-table tr.week-row td {
    padding: 8px 10px;
    border-top: 2px solid #b9c8c1;
    border-bottom: 1px solid #cfd8d3;
    color: var(--accent);
    background: #e8f0ed;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.data-table tr.today {
    background: #e8f6ff;
}

.data-table tr.today td:first-child {
    border-left: 4px solid #1677a8;
}

.good-text {
    color: var(--good);
    font-weight: 700;
}

.bad-text {
    color: var(--danger);
    font-weight: 700;
}

.good-balance {
    color: #226b38;
    background: #edf8f0;
    font-weight: 700;
}

.bad-balance {
    color: #8f2e2e;
    background: #fdeeee;
    font-weight: 700;
}

.section-title {
    margin: 2px 0 10px;
}

.compact-table .data-table {
    min-width: 720px;
}

.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.split {
    display: grid;
    grid-template-columns: minmax(360px, 540px) minmax(420px, 1fr);
    gap: 16px;
    align-items: start;
}

.panel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

.wide {
    grid-column: 1 / -1;
}

.ghost {
    background: transparent;
}

.travel-preview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.preview-item {
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-2);
}

.preview-item span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.preview-item strong {
    display: block;
    margin-top: 5px;
    font-size: 16px;
}

.travel-list {
    display: grid;
    gap: 8px;
}

.trip-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.trip-row.unpaid {
    border-color: #e2c96a;
    background: #fff6c7;
}

.trip-row.paid {
    border-color: #9dca9b;
    background: #e8f6e6;
}

.trip-row h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.trip-row p {
    color: var(--muted);
    font-size: 12px;
}

.trip-row strong {
    font-size: 18px;
}

.trip-actions {
    display: flex;
    gap: 6px;
    justify-content: end;
    margin-top: 8px;
}

.settings-panel {
    max-width: 1180px;
}

.settings-stack {
    display: grid;
    gap: 18px;
}

.settings-group {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.settings-group:first-child {
    padding-top: 0;
    border-top: 0;
}

.settings-group-title {
    margin-bottom: 9px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
}

.settings-row {
    display: grid;
    gap: 12px;
    align-items: end;
}

.settings-row.four-cols {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.settings-row.two-cols {
    grid-template-columns: repeat(2, minmax(180px, 260px));
}

.settings-row.night-cols {
    grid-template-columns: minmax(120px, 160px) minmax(120px, 160px) minmax(160px, 220px);
}
.status-settings-table {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.status-settings-table .data-table {
    min-width: 620px;
}

.status-settings-table .data-table th {
    position: static;
}

.status-settings-table .data-table td:last-child {
    color: var(--muted);
    line-height: 1.4;
}

.status-settings-table input {
    min-width: 220px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.actions {
    margin-top: 18px;
}

.inline-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.outlays-editor {
    display: grid;
    gap: 8px;
}

.outlay-rows {
    display: grid;
    gap: 8px;
}

.outlay-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(100px, 140px) auto;
    gap: 8px;
    align-items: center;
}

.travel-preview {
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
}

.allowance-table-wrap {
    max-height: 460px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.allowance-table {
    min-width: 720px;
}

.allowance-table th {
    top: 0;
}

.allowance-table td:first-child {
    width: 46%;
    font-weight: 700;
}

.allowance-table input {
    min-width: 96px;
}
@media (max-width: 980px) {
    .topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .tabs {
        width: 100%;
    }

    .tab {
        flex: 1;
    }

    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .split {
        grid-template-columns: 1fr;
    }

    .settings-row.four-cols,
    .settings-row.two-cols,
    .settings-row.night-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    main {
        padding: 12px;
    }

    /* Header scrollt mit, statt den halben Screen dauerhaft zu belegen */
    .topbar {
        position: static;
        gap: 10px;
        padding: 10px 12px;
    }

    .topbar h1 {
        font-size: 17px;
    }

    .topbar p {
        font-size: 11px;
    }

    /* Tab-Menü als 2x2-Raster, damit es nicht über den Hintergrund hinausläuft */
    .tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

    .tab {
        flex: none;
        min-width: 0;
        padding: 0 8px;
        font-size: 13px;
    }

    /* Soll/Ist-Übersicht bleibt oben kleben – der Header ist jetzt statisch */
    .work-sticky-summary {
        top: 0;
        margin: -12px -12px 12px;
        padding: 12px 12px 4px;
    }

    .form-grid,
    .travel-preview,
    .settings-row.four-cols,
    .settings-row.two-cols,
    .settings-row.night-cols,
    .outlay-row {
        grid-template-columns: 1fr;
    }

    /* Eingabefelder dürfen nie breiter als ihre Karte werden */
    input,
    select {
        min-width: 0;
        max-width: 100%;
    }

    /* Status-Tabelle bricht innerhalb der Karte um statt seitlich auszubrechen */
    .status-settings-table .data-table {
        min-width: 0;
    }

    .status-settings-table input,
    .allowance-table input {
        min-width: 0;
    }

    .allowance-table {
        min-width: 460px;
    }
}


a.button {
    min-height: 34px;
}

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

.account-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 8px;
    color: var(--ink);
    background: #fff;
    font: inherit;
    resize: vertical;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
}

.auth-shell {
    width: min(440px, calc(100vw - 28px));
    padding: 0;
}

.auth-panel {
    display: grid;
    gap: 14px;
}

.auth-panel h1 {
    font-size: 20px;
}

.auth-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.auth-error {
    padding: 9px 10px;
    border: 1px solid #e1a1a1;
    border-radius: 6px;
    color: var(--danger);
    background: #fff0f0;
    font-size: 13px;
}

.inline-panel-title {
    align-items: center;
    margin-bottom: 10px;
}

.token-new {
    margin: 10px 0;
}

.token-table,
.user-table {
    min-width: 760px;
}

.user-create-row {
    grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(90px, 120px) auto;
    margin-bottom: 12px;
}

.token-table code {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
}
@media (max-width: 980px) {
    .topbar-actions {
        justify-content: space-between;
    }

    .user-create-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .topbar-actions {
        width: 100%;
    }

    .user-create-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 landscape;
        margin: 5mm;
    }

    html,
    body.printing-work {
        width: 287mm;
        height: 200mm;
        overflow: hidden;
    }

    .topbar,
    .toolbar,
    .actions,
    .tabs,
    button,
    .button {
        display: none !important;
    }

    main {
        padding: 0;
    }

    body.printing-work main {
        width: 287mm;
        height: 200mm;
        overflow: hidden;
    }

    body.printing-work #workView {
        width: 312mm;
        height: 217mm;
        overflow: hidden;
        zoom: .92;
        break-after: avoid;
        page-break-after: avoid;
    }

    .view {
        display: block;
    }

    .view:not(.active) {
        display: none;
    }

    .table-wrap,
    .panel,
    .metric {
        box-shadow: none;
    }

    body.printing-work {
        background: #fff;
    }

    body.printing-work .work-sticky-summary {
        position: static;
        margin: 0 0 2mm;
        padding: 0;
        background: #fff;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.printing-work .metrics {
        grid-template-columns: repeat(9, minmax(0, 1fr));
        gap: 1mm;
        margin-bottom: 2mm;
    }

    body.printing-work .metric {
        min-height: 0;
        padding: 1mm;
        border-radius: 0;
    }

    body.printing-work .metric span {
        font-size: 6.5pt;
    }

    body.printing-work .metric strong {
        margin-top: .5mm;
        font-size: 8.5pt;
    }

    body.printing-work .table-wrap {
        overflow: hidden;
        border: 0;
        border-radius: 0;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.printing-work #workTable {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
    }

    body.printing-work #workTable th,
    body.printing-work #workTable td {
        padding: .55mm .65mm;
        font-size: 5.8pt;
        line-height: 1;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.printing-work #workTable th {
        position: static;
        font-size: 5.4pt;
    }

    body.printing-work #workTable input,
    body.printing-work #workTable select {
        min-width: 0;
        min-height: 0;
        width: 100%;
        border: 0;
        padding: 0;
        color: #17211d;
        background: transparent;
        appearance: none;
        font-size: inherit;
    }

    body.printing-work #workTable .time-input,
    body.printing-work #workTable .pause-input,
    body.printing-work #workTable .code-input,
    body.printing-work #workTable .note-input {
        width: 100%;
        min-width: 0;
    }

    body.printing-work .data-table tr.week-row td {
        padding: .55mm .65mm;
        font-size: 5.8pt;
    }

    body.printing-work #workTable tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    body.printing-work #workTable th:nth-child(1),
    body.printing-work #workTable td:nth-child(1) { width: 4%; }
    body.printing-work #workTable th:nth-child(2),
    body.printing-work #workTable td:nth-child(2) { width: 8%; }
    body.printing-work #workTable th:nth-child(3),
    body.printing-work #workTable td:nth-child(3) { width: 12%; }
    body.printing-work #workTable th:nth-child(4),
    body.printing-work #workTable td:nth-child(4),
    body.printing-work #workTable th:nth-child(5),
    body.printing-work #workTable td:nth-child(5) { width: 6%; }
    body.printing-work #workTable th:nth-child(6),
    body.printing-work #workTable td:nth-child(6) { width: 5%; }
    body.printing-work #workTable th:nth-child(7),
    body.printing-work #workTable td:nth-child(7) { width: 12%; }
    body.printing-work #workTable th:nth-child(8),
    body.printing-work #workTable td:nth-child(8),
    body.printing-work #workTable th:nth-child(9),
    body.printing-work #workTable td:nth-child(9),
    body.printing-work #workTable th:nth-child(10),
    body.printing-work #workTable td:nth-child(10) { width: 5.5%; }
    body.printing-work #workTable th:nth-child(11),
    body.printing-work #workTable td:nth-child(11) { width: 31.5%; }

    body.printing-work #workTable th:nth-child(12),
    body.printing-work #workTable td:nth-child(12) { display: none; }
}

#workTable {
    min-width: 1280px;
}

#workTable th:nth-child(4),
#workTable td:nth-child(4),
#workTable th:nth-child(5),
#workTable td:nth-child(5) {
    width: 260px;
    vertical-align: top;
}

#workTable th:nth-child(6),
#workTable td:nth-child(6) {
    width: 170px;
}

#workTable th:nth-child(7),
#workTable td:nth-child(7),
#workTable th:nth-child(8),
#workTable td:nth-child(8),
#workTable th:nth-child(9),
#workTable td:nth-child(9) {
    width: 76px;
}

#workTable th:nth-child(10),
#workTable td:nth-child(10) {
    width: 320px;
}

#workTable th:nth-child(11),
#workTable td:nth-child(11) {
    width: 42px;
}

.interval-editor {
    display: grid;
    gap: 5px;
    min-width: 238px;
}

.interval-list {
    display: grid;
    gap: 5px;
}

.interval-row {
    display: grid;
    grid-template-columns: 84px auto 84px 28px;
    gap: 5px;
    align-items: center;
}

.interval-row span {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

#workTable .interval-row .time-input {
    width: 84px;
    min-width: 84px;
}

.interval-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.break-total {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

#workTable .interval-add,
#workTable .interval-remove {
    min-width: 28px;
    min-height: 26px;
    padding: 0;
    line-height: 1;
}

#workTable .interval-remove {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
}

#workTable .interval-remove:hover {
    border-color: var(--danger);
    color: var(--danger);
}

@media print {
    body.printing-work #workTable th:nth-child(4),
    body.printing-work #workTable td:nth-child(4),
    body.printing-work #workTable th:nth-child(5),
    body.printing-work #workTable td:nth-child(5) { width: 14%; }
    body.printing-work #workTable th:nth-child(6),
    body.printing-work #workTable td:nth-child(6) { width: 10%; }
    body.printing-work #workTable th:nth-child(7),
    body.printing-work #workTable td:nth-child(7),
    body.printing-work #workTable th:nth-child(8),
    body.printing-work #workTable td:nth-child(8),
    body.printing-work #workTable th:nth-child(9),
    body.printing-work #workTable td:nth-child(9) { width: 5.5%; }
    body.printing-work #workTable th:nth-child(10),
    body.printing-work #workTable td:nth-child(10) { width: 20%; }
    body.printing-work #workTable th:nth-child(11),
    body.printing-work #workTable td:nth-child(11) { display: none; }

    body.printing-work .interval-editor,
    body.printing-work .interval-list {
        gap: .6mm;
        min-width: 0;
    }

    body.printing-work .interval-row {
        grid-template-columns: 1fr auto 1fr;
        gap: .6mm;
    }

    body.printing-work .interval-remove,
    body.printing-work .interval-add {
        display: none !important;
    }

    body.printing-work .interval-toolbar {
        display: block;
    }
}
.app-message {
    margin: 12px 22px 0;
    padding: 10px 12px;
    border: 1px solid #e1a1a1;
    border-radius: 6px;
    color: var(--danger);
    background: #fff0f0;
    font-size: 13px;
    font-weight: 700;
}

.app-message[data-tone="info"] {
    border-color: #b8cec7;
    color: var(--accent);
    background: #eef7f4;
}

#workTable .row-delete {
    min-width: 30px;
    min-height: 30px;
    border-color: #e1a1a1;
    background: #fff0f0;
    color: var(--danger);
    font-size: 16px;
    font-weight: 700;
}

#workTable .row-delete:hover {
    border-color: var(--danger);
    color: #fff;
    background: var(--danger);
}

.interval-editor {
    padding: 7px;
    border: 1px solid #dfe7e2;
    border-radius: 6px;
    background: #fbfcfb;
}

.work-editor {
    border-left: 3px solid var(--accent);
}

.break-editor {
    border-left: 3px solid #8a6f1d;
}

.interval-list {
    gap: 6px;
}

.interval-row {
    grid-template-columns: 84px auto 84px 28px;
    padding: 3px;
    border-radius: 5px;
    background: #fff;
}

.interval-row.break-row {
    grid-template-columns: 84px auto 84px minmax(58px, 1fr) 28px;
}

.break-total {
    align-self: center;
    justify-self: start;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.interval-toolbar {
    justify-content: flex-start;
    margin: 6px 0 0;
}

#workTable .interval-add {
    min-width: 28px;
    padding: 0 8px;
}

#workTable .break-editor .interval-add {
    min-width: 78px;
}

#workTable .interval-remove,
.danger-icon {
    border-color: transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
}

#workTable .interval-remove:hover,
.danger-icon:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: #fff0f0;
}

.bonus-period-list {
    display: grid;
    gap: 10px;
}

.bonus-period-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(110px, 140px) minmax(110px, 140px) minmax(140px, 170px) auto;
    gap: 10px;
    align-items: end;
}

.settings-add-row {
    margin-top: 10px;
}

.token-create-row {
    grid-template-columns: minmax(220px, 320px) auto;
    justify-content: start;
    margin-bottom: 18px;
}

.token-table-wrap {
    margin-top: 12px;
}

@media (max-width: 980px) {
    .bonus-period-row,
    .token-create-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .app-message {
        margin: 10px 12px 0;
    }

    .interval-row,
    .interval-row.break-row {
        grid-template-columns: 1fr auto 1fr auto;
    }

    .interval-row.break-row .break-total {
        grid-column: 1 / -2;
    }

    .bonus-period-row,
    .token-create-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    body.printing-work .interval-editor,
    body.printing-work .interval-row {
        border: 0;
        padding: 0;
        background: transparent;
    }

    body.printing-work .interval-row span {
        font-size: inherit;
        line-height: 1;
        text-align: center;
    }

    body.printing-work .break-total {
        font-size: inherit;
    }
}
