* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    padding-top: 60px;
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #1a73e8;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: 60px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: height 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.navbar.scrolled {
    height: 44px;
    background-color: #155bb5;
    box-shadow: 0 2px 12px rgba(0,0,0,0.28);
}

.navbar .brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: font-size 0.25s ease;
}

.navbar.scrolled .brand {
    font-size: 1.05rem;
}

.navbar nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.2s, font-size 0.25s ease;
}

.navbar.scrolled nav a {
    font-size: 0.85rem;
}

.navbar nav a:hover,
.navbar nav a.active {
    color: #fff;
    font-weight: 600;
}

/* ── Hero ── */
.hero {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    text-align: center;
    padding: 4rem 1rem 5rem;
}

.hero h1 {
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 520px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: opacity 0.2s, transform 0.1s;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-white {
    background: #fff;
    color: #1a73e8;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.7);
    margin-left: 0.75rem;
}

/* ── Cards ── */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.section-title {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.section-sub {
    text-align: center;
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.card .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
    color: #1a1a2e;
}

.card p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.5;
}

/* ── Stats bar ── */
.stats-bar {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    margin-top: 0;
}

.stats-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat {
    text-align: center;
}

.stat .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a73e8;
}

.stat .label {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.2rem;
}

/* ── Footer ── */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.82rem;
    color: #aaa;
    border-top: 1px solid #e0e0e0;
    background: #fff;
    margin-top: 2rem;
}

/* ── Alert ── */
.alert-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5c6c2;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ── Recent block ── */
.recent-block {
    margin-top: 3rem;
}

.recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.recent-header h2 {
    font-size: 1.3rem;
    color: #1a1a2e;
}

.btn-link {
    font-size: 0.9rem;
    color: #1a73e8;
    text-decoration: none;
    font-weight: 600;
}

.btn-link:hover {
    text-decoration: underline;
}

/* ── Data table ── */
.table-wrapper {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead th {
    background: #f8f9fb;
    padding: 0.75rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8eaed;
    white-space: nowrap;
}

.data-table thead th.ta-right {
    text-align: right;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: #f5f8ff;
}

.data-table td {
    padding: 0.65rem 0.75rem;
    vertical-align: middle;
}

.td-id {
    color: #999;
    font-size: 0.8rem;
    width: 40px;
}

.td-date {
    white-space: nowrap;
    color: #555;
    font-size: 0.85rem;
}

.td-amount {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-open {
    background: #fff3cd;
    color: #856404;
}

.badge-approved {
    background: #d1f0e0;
    color: #1a6e3d;
}

.badge-rejected {
    background: #fde8e8;
    color: #a31515;
}

/* ── Action button ── */
.btn-action {
    padding: 0.3rem 0.8rem;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}

.btn-action:hover {
    background: #c5d8fc;
}

/* ── Primary button ── */
.btn-primary {
    background: #1a73e8;
    color: #fff;
}

/* ── Empty state ── */
.empty-state {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 3rem;
    text-align: center;
    color: #888;
}

.empty-state span {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ── Page header ── */
.page-header {
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.page-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header-title {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 0.2rem;
}

.page-header-sub {
    font-size: 0.9rem;
    color: #666;
}

.btn-outline-dark {
    background: transparent;
    color: #444;
    border: 2px solid #ccc;
    padding: 0.55rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.btn-outline-dark:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}

/* ── Form card ── */
.form-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.form-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9fb;
}

.form-card-header .form-card-icon {
    font-size: 1.2rem;
}

.form-card-header h2 {
    font-size: 1.05rem;
    color: #1a1a2e;
    font-weight: 600;
}

/* ── Form grid ── */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-col-2 {
    grid-column: span 1;
}

.form-col-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #444;
}

.required {
    color: #e53935;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    padding: 0.6rem 0.85rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.92rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Items table ── */
.items-table-wrapper {
    overflow-x: auto;
    padding: 1.5rem 1.5rem 0;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.items-table thead th {
    background: #f8f9fb;
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e8eaed;
    white-space: nowrap;
}

.items-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.items-table tbody tr:last-child {
    border-bottom: none;
}

.items-table td {
    padding: 0.55rem 0.4rem;
    vertical-align: middle;
}

.items-table td:first-child { padding-left: 0; }
.items-table td:last-child  { padding-right: 0; }

.items-table select,
.items-table input[type="text"],
.items-table input[type="date"],
.items-table input[type="time"],
.items-table input[type="number"] {
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-size: 0.88rem;
    font-family: inherit;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.items-table select:focus,
.items-table input:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.col-amount { width: 130px; }
.col-ratio  { width: 80px; }
.col-action { width: 40px; }

.btn-remove-row {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
    display: block;
    margin: 0 auto;
}

.btn-remove-row:hover {
    color: #e53935;
    background: #fde8e8;
}

/* ── Items footer ── */
.items-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 1.5rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn-add-row {
    background: #e8f0fe;
    color: #1a73e8;
    border: none;
    padding: 0.55rem 1.1rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-row:hover {
    background: #c5d8fc;
}

.total-display {
    font-size: 1rem;
    color: #444;
}

.total-display strong {
    font-size: 1.15rem;
    color: #1a73e8;
}

/* ── Form actions ── */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-submit {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* ── Error list ── */
.error-list {
    margin: 0.5rem 0 0 1.2rem;
    padding: 0;
    font-size: 0.9rem;
}

/* ── Meal allowance box ── */
.meal-box {
    margin: 0 1.5rem 1.5rem;
    border: 1px solid #c3d7f5;
    border-radius: 8px;
    background: #f0f6ff;
    overflow: hidden;
}

.meal-box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    background: #dbeafe;
    font-size: 0.9rem;
    border-bottom: 1px solid #c3d7f5;
    flex-wrap: wrap;
}

.meal-hint {
    font-size: 0.8rem;
    color: #5b7fa6;
    font-weight: normal;
    margin-left: auto;
}

.meal-details {
    padding: 0.75rem 1rem 0;
}

.meal-placeholder {
    font-size: 0.88rem;
    color: #7a9cc0;
    font-style: italic;
    margin: 0;
    padding-bottom: 0.75rem;
}

.meal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    margin-bottom: 0.5rem;
}

.meal-table thead th {
    font-weight: 600;
    color: #2c5282;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #c3d7f5;
    text-align: left;
    background: transparent;
    white-space: nowrap;
}

.meal-table tbody td {
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid #ddeeff;
    color: #2c4a6e;
}

.meal-table tbody tr:last-child td {
    border-bottom: none;
}

.ta-right {
    text-align: right;
}

.meal-table thead th.ta-right {
    text-align: right;
}

.meal-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    color: #1a4a7a;
    border-top: 2px solid #c3d7f5;
    background: #e0eeff;
}

.meal-total-row strong {
    font-size: 1.1rem;
    color: #1a73e8;
}

/* ── Form card hint (optional label in header) ── */
.form-card-hint {
    font-size: 0.8rem;
    color: #888;
    font-weight: normal;
    margin-left: auto;
}

/* ── Alert: success ── */
.alert-success {
    background: #d1f0e0;
    color: #1a6e3d;
    border: 1px solid #a8dfc0;
    border-radius: 8px;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ── List page: filter bar ── */
.filter-bar {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-col-wide { grid-column: span 1; }

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ── List page: summary bar ── */
.list-summary {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.ls-item {
    flex: 1;
    padding: 1rem 1.5rem;
    text-align: center;
    border-right: 1px solid #f0f0f0;
}

.ls-item:last-child { border-right: none; }

.ls-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a73e8;
    line-height: 1.2;
}

.ls-value.ls-open     { color: #856404; }
.ls-value.ls-approved { color: #1a6e3d; }

.ls-label {
    display: block;
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.2rem;
}

/* ── List page: table extras ── */
.list-title-link {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.list-title-link:hover { color: #1a73e8; text-decoration: underline; }

.td-sub {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 0.15rem;
}

.td-sep {
    color: #ccc;
    margin: 0 0.2rem;
}

.td-num {
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}

/* ── Inline status select ── */
.status-form { display: inline; }

.status-select {
    padding: 0.28rem 0.6rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    text-align: center;
    transition: opacity 0.15s;
}

.status-select:hover  { opacity: 0.85; }

.status-select.status-offen     { background: #fff3cd; color: #856404; }
.status-select.status-genehmigt { background: #d1f0e0; color: #1a6e3d; }
.status-select.status-abgelehnt { background: #fde8e8; color: #a31515; }

/* ── Settings page ── */
.settings-table-wrapper {
    padding: 0 1.5rem;
    overflow-x: auto;
}

.settings-form {
    border-top: 2px dashed #e8eaed;
    padding: 1.5rem;
    background: #f8f9fb;
    border-radius: 0 0 10px 10px;
}

.settings-form-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.2rem;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.col-span-2 {
    grid-column: span 2;
}

.settings-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ── Table: actions column ── */
.td-actions {
    white-space: nowrap;
    text-align: right;
    width: 1%;
    padding-right: 0.75rem !important;
}

.td-actions form {
    display: inline;
}

.btn-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    background: #e8f0fe;
    color: #1a73e8;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
    vertical-align: middle;
}

.btn-action-icon:hover { background: #c5d8fc; }
.btn-action-icon.danger { background: #fde8e8; color: #c0392b; }
.btn-action-icon.danger:hover { background: #f5c6c2; }

.btn-action-danger {
    background: #fde8e8;
    color: #c0392b;
}

.btn-action-danger:hover {
    background: #f5c6c2;
}

/* ── Kunden & Projekte Hierarchie-Baum ── */
.cust-tree {
    padding: 0.5rem 0;
}

.cust-node {
    border-bottom: 1px solid #f0f0f0;
}

.cust-node:last-child { border-bottom: none; }

.cust-node-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
    flex-wrap: wrap;
}

.cust-node-empty .cust-node-header { cursor: default; }

.cust-node-header:hover:not(.cust-node-empty .cust-node-header) {
    background: #f5f8ff;
}

.cust-node-toggle {
    font-size: 0.7rem;
    color: #aaa;
    width: 1rem;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.cust-node-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a2e;
}

.cust-node-email {
    font-size: 0.78rem;
    color: #888;
}

.cust-node-type {
    font-size: 0.72rem;
    background: #e8f0fe;
    color: #1a73e8;
    border-radius: 10px;
    padding: 1px 8px;
    font-weight: 600;
}

.cust-node-badge {
    font-size: 0.72rem;
    background: #d1f0e0;
    color: #1a6e3d;
    border-radius: 10px;
    padding: 1px 8px;
    font-weight: 600;
    margin-left: auto;
}

.cust-node-id {
    font-size: 0.72rem;
    color: #bbb;
    margin-left: 0.25rem;
}

.cust-node-projects {
    padding: 0 0 0.5rem 2.75rem;
    background: #fafbff;
    border-top: 1px solid #f0f0f0;
}

.proj-node {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 1rem 0.45rem 0;
    border-bottom: 1px solid #f0f0f4;
    font-size: 0.85rem;
}

.proj-node:last-child { border-bottom: none; }

.proj-node-icon { font-size: 0.85rem; flex-shrink: 0; }

.proj-node-name { color: #333; flex: 1; }

.proj-node-id {
    font-size: 0.72rem;
    color: #bbb;
}

.proj-node-date {
    font-size: 0.72rem;
    color: #aaa;
    white-space: nowrap;
}

.cust-node-orphan .cust-node-header { background: #fffbe6; }
.cust-node-orphan .cust-node-projects { background: #fffef5; }

/* ── Berichte: Monats-Details aufklappbar ── */
.report-month-has-details:hover {
    background: #f5f8ff;
}
.report-month-toggle {
    font-size: 0.65rem;
    color: #aaa;
    transition: transform 0.1s;
    display: inline-block;
}
.report-month-details {
    background: #fafbfc;
}
.country-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #4178c4;
    border-radius: 8px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 4px;
}

/* ── Currently-editing row highlight ── */
.row-editing {
    background: #e8f0fe;
}

.row-editing td {
    border-bottom: 1px solid #c5d8fc;
}

/* ── Country badge ── */
.country-badge {
    display: inline-block;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-right: 0.3rem;
    vertical-align: middle;
    letter-spacing: 0.03em;
}

/* ── Empty table state ── */
.td-empty {
    text-align: center;
    color: #aaa;
    font-style: italic;
    padding: 2rem 1rem;
}

/* ── Field hint text in labels ── */
.field-hint {
    font-size: 0.75rem;
    color: #999;
    font-weight: normal;
}

/* ── Responsive: settings form ── */
@media (max-width: 900px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .list-summary { flex-wrap: wrap; }
    .ls-item { flex: 1 1 40%; border-bottom: 1px solid #f0f0f0; }
}

/* ── Papierkram export page ── */
.pk-status-card .form-card-header { border-bottom: none; }

.pk-status-body { padding: 1rem 1.5rem 1.25rem; }

.pk-status-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pk-status-ok   { background: #d1f0e0; }
.pk-status-warn { background: #fff3cd; }

.pk-dot { font-size: 1rem; }
.pk-dot-ok   { color: #1a6e3d; }
.pk-dot-warn { color: #856404; }

.pk-token-preview { font-size: 0.82rem; background: #e8f0fe; padding: 0.1rem 0.4rem; border-radius: 4px; }

.pk-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1.25rem;
}

.pk-tab {
    padding: 0.65rem 1.25rem;
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pk-tab:hover     { color: #1a73e8; }
.pk-tab-active    { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: 600; }

.pk-tab-badge {
    background: #e0e0e0;
    color: #555;
    border-radius: 20px;
    padding: 0.05rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.pk-tab-badge-ok  { background: #d1f0e0; color: #1a6e3d; }
.pk-tab-badge-err { background: #fde8e8; color: #a31515; }

.pk-batch-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #555;
}

.btn-action-export { background: #e8f0fe; color: #1a73e8; }
.btn-action-export:hover { background: #c5d8fc; }

.pk-error-msg {
    font-size: 0.82rem;
    color: #a31515;
    font-family: monospace;
    word-break: break-word;
    max-width: 300px;
    display: block;
}

.pk-voucher-id {
    font-size: 0.8rem;
    background: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* ── Papierkram settings section ── */
.pk-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
    margin-top: 0.5rem;
}

.pk-info-box {
    margin: 1.25rem 0 0;
    padding: 1rem 1.25rem;
    background: #f8f9fb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.85rem;
}

.pk-accounts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem 1rem;
    margin-top: 0.65rem;
}

.pk-acc {
    font-size: 0.82rem;
    color: #444;
}

.pk-acc strong { color: #1a73e8; }

.pk-sync-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
}

.pk-sync-card {
    background: #f8f9fb;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
}

.pk-sync-header {
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.pk-sync-desc {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 0.75rem;
}

.pk-sync-table { max-height: 220px; overflow-y: auto; }

/* ── Kostenpositionen: Kontierungsbadge + USt.-Spalte ── */
.item-konto-badge {
    font-size: 0.72rem;
    color: #1a73e8;
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.col-vat  { width: 90px; }
.col-date { width: 110px; }

@media (max-width: 900px) {
    .pk-sync-grid { grid-template-columns: 1fr; }
}

/* ── Bestätigungs-Panel (Export) ── */
.pk-confirm-panel {
    background: #fffbe6;
    border: 2px solid #f0b429;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.pk-confirm-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #7d4e00;
    margin-bottom: 1rem;
}

.pk-confirm-details {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e8d08a;
    margin-bottom: 1rem;
    overflow: hidden;
}

.pk-confirm-row {
    display: flex;
    gap: 1rem;
    padding: 0.55rem 1rem;
    border-bottom: 1px solid #f5f0e0;
    font-size: 0.88rem;
    align-items: flex-start;
}

.pk-confirm-row:last-child { border-bottom: none; }

.pk-confirm-label {
    min-width: 100px;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
}

.pk-confirm-total { background: #f8f5e8; font-size: 0.95rem; }

.pk-confirm-items { align-items: flex-start; }

.pk-confirm-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}

.pk-confirm-table td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #f0ece0;
}

.pk-confirm-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Balkendiagramm (Reports) ── */
.report-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    height: 160px;
    padding: 0 0.25rem;
    margin-bottom: 1rem;
}

.rbc-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.rbc-bar-wrap {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    padding: 0 2px;
}

.rbc-bar {
    width: 100%;
    min-height: 3px;
    background: linear-gradient(180deg, #1a73e8, #4fa3f7);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: opacity 0.15s;
    cursor: default;
}

.rbc-bar:hover { opacity: 0.8; }

.rbc-val {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.68rem;
    color: #555;
    white-space: nowrap;
}

.rbc-label {
    font-size: 0.72rem;
    color: #888;
    margin-top: 4px;
    text-align: center;
}

.rbc-count {
    font-size: 0.68rem;
    color: #1a73e8;
    font-weight: 600;
}

/* ── Länder-Konfiguration (Settings) ── */
.countries-region {
    margin-bottom: 1.5rem;
}

.countries-region-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}

.countries-checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.country-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem 0.3rem 0.5rem;
    border-radius: 20px;
    border: 1.5px solid #ddd;
    background: #f8f9fb;
    cursor: pointer;
    font-size: 0.82rem;
    color: #555;
    transition: all 0.15s;
    user-select: none;
}

.country-toggle input[type="checkbox"] {
    display: none;
}

.country-toggle.active,
.country-toggle:has(input:checked) {
    border-color: #1a73e8;
    background: #e8f0fe;
    color: #1a1a2e;
    font-weight: 600;
}

.country-toggle:hover {
    border-color: #1a73e8;
    background: #f0f4ff;
}

/* ── Settings Tab-Navigation ── */
.settings-tabnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    background: #f3f4f6;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 0.4rem;
    margin-bottom: 1.5rem;
}

.stn-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 1rem;
    border-radius: 7px;
    font-size: 0.87rem;
    font-weight: 500;
    color: #555;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
}

.stn-tab:hover {
    background: #fff;
    color: #1a1a2e;
}

.stn-tab.stn-active {
    background: #fff;
    color: #1a73e8;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0,0,0,0.10);
}

.stn-tab.stn-migrate {
    margin-left: auto;
    color: #888;
    border: 1px dashed #ccc;
}

.stn-tab.stn-migrate:hover {
    color: #e8700a;
    border-color: #e8700a;
    background: #fff8f0;
}

.stn-tab.stn-warn {
    color: #d97706;
    border-color: #f0b429;
}

/* ── Navbar: eingeloggter Benutzer + Abmelden-Link ── */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.nu-name {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nu-logout {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 5px;
    padding: 0.25rem 0.65rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.nu-logout:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}

.ct-flag {
    font-size: 0.72rem;
    background: #ddd;
    border-radius: 3px;
    padding: 1px 4px;
    font-weight: 700;
    color: #444;
    letter-spacing: 0.03em;
}

.country-toggle.active .ct-flag,
.country-toggle:has(input:checked) .ct-flag {
    background: #1a73e8;
    color: #fff;
}

/* ── Km table column widths ── */
.col-km   { width: 80px; }
.col-rate { width: 100px; }

/* ── Km display cells ── */
.td-muted {
    color: #999;
    font-size: 0.85rem;
    white-space: nowrap;
}

.km-amount-cell {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-col-2 {
        grid-column: span 1;
    }
    .page-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
    .meal-hint {
        display: none;
    }
}
