:root {
    --primary: #009fe3;
    --black: #000;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: var(--white);
    color: var(--black);
}

/* ===== Header ===== */
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 20px;
}

.header-center {
    display: flex;
    justify-content: center;
}

/* Navigation mittig und ruhiger */
.nav {
    display: flex;
    gap: 28px;
}

.nav a {
    text-decoration: none;
    color: var(--black);
    font-weight: 500;
    position: relative;
    padding: 4px 0;
}

.nav a.active,
.nav a:hover {
    color: var(--primary);
}

.nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

/* ===== Main ===== */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.page h1 {
    margin-top: 0;
}

.hint {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-left: 4px solid var(--primary);
    font-size: 14px;
}

/* ===== Footer ===== */
.footer {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    border-top: 1px solid #eee;
}


/* Buttons */
.btn {
    border: 1px solid #000;
    background: #fff;
    color: #000;
    padding: 10px 14px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(0.95);
    color: #fff;
}

.btn-danger {
    border-color: #000;
}

.btn-small {
    padding: 8px 10px;
    font-size: 13px;
}

/* Page header */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 18px;
}

.page-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Search */
.searchbar {
    display: flex;
    gap: 10px;
    align-items: center;
}
.searchbar input {
    min-width: 260px;
}

/* Table (div-based, schnell und clean) */
.table {
    border: 1px solid #000;
    background: #fff;
}

.table-row {
    display: grid;
    grid-template-columns: 70px 160px 1fr 180px 220px;
    gap: 12px;
    padding: 14px 12px;
    border-top: 1px solid #000;
    align-items: center;
}

/* Services: eigene Grid-Spalten, Kunden bleibt unangetastet */
.table-services .table-row {
    grid-template-columns: 70px 160px 1fr 140px 120px 240px;
}

/* Aktionen: in Services nicht umbrechen */
.table-services .actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}


.table-head {
    background: var(--primary);
    color: #fff;
    border-top: 0;
    font-weight: 600;
}

.table-empty {
    padding: 18px 12px;
}

.table-assignments .table-row {
    grid-template-columns: 80px 1.4fr 1.4fr 160px 240px;
}

.table-assignments .actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.right {
    text-align: right;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;   /* 🔥 wichtig */
    white-space: nowrap;/* 🔥 verhindert Umbruch */
}

/* Card / Form */
.card {
    border: 1px solid #000;
    padding: 18px;
    max-width: 560px;
}

.form-row {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

/* Flash */
.flash {
    max-width: 1200px;
    margin: 16px auto 0;
    padding: 12px 18px;
    border: 1px solid #000;
}

.flash.success {
    border-color: var(--primary);
}

.flash.error {
    border-color: #000;
}

.table-invoices .table-row {
    grid-template-columns: 1.4fr 140px 160px 140px;
}

.table-invoice-items .table-row {
    grid-template-columns: 1fr 2fr 140px;
}

.table-invoices .actions,
.table-invoice-items .actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}

.table-invoices .table-row {
    grid-template-columns: 160px 1.4fr 140px 140px 160px 140px;
}

.table-invoice-items .table-row {
    grid-template-columns: 1fr 2fr 200px 140px;
}

.table-invoices .actions,
.table-invoice-items .actions {
    flex-wrap: nowrap;
    white-space: nowrap;
}
