* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #ffffff;
    color: #222;
}

a {
    color: #1f5f99;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.site-header {
    background: #1f5f99;
    color: white;
    padding: 18px 25px;
}

.site-header h1 {
    margin: 0;
    font-size: 24px;
}

.site-nav {
    margin-top: 10px;
}

.site-nav a {
    color: white;
    margin-right: 18px;
    font-weight: bold;
}

.card {
    background: white;
    padding: 22px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

h2, h3 {
    margin-top: 0;
    color: #1f5f99;
}

.form-row {
    margin-bottom: 14px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 4px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 12px;
}

textarea {
    min-height: 80px;
}

button,
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #1f5f99;
    color: white;
    font-weight: bold;
    cursor: pointer;
    font-size: 15px;
}

button:hover,
.btn:hover {
    background: #17466f;
    text-decoration: none;
}

.btn-success {
    background: #2e8b57;
}

.btn-success:hover {
    background: #246b44;
}

.btn-danger {
    background: #b83232;
}

.btn-danger:hover {
    background: #8f2525;
}

.btn-secondary {
    background: #666;
}

.btn-secondary:hover {
    background: #444;
}

.message,
.meldung {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 18px;
    background: #eaffe8;
    border-left: 5px solid #1f5f99;
}

.error {
    background: #ffecec;
    border-left: 5px solid #b83232;
}

.success {
    background: #e9f8ef;
    border-left: 5px solid #2e8b57;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 15px;
}

th,
td {
    padding: 5px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background: #91aff1;
    font-size: 12px;
    text-align: center;
}
/* WE Nr */
th:nth-child(1),
td:nth-child(1) {
    width: 90px;
}

/* Wohnung / Lage */
th:nth-child(2),
td:nth-child(2) {
    width: 120px;
}

/* Vorname */
th:nth-child(3),
td:nth-child(3) {
    width: 170px;
}

/* Nachname */
th:nth-child(4),
td:nth-child(4) {
    width: 200px;
}

/* Einzug */
th:nth-child(5),
td:nth-child(5) {
    width: 120px;
}

/* Auszug */
th:nth-child(6),
td:nth-child(6) {
    width: 120px;
}

/* Personen */
th:nth-child(7),
td:nth-child(7) {
    width: 90px;
}

/* Wohnfläche */
th:nth-child(8),
td:nth-child(8) {
    width: 120px;
}

/* Kaltmiete */
th:nth-child(9),
td:nth-child(9) {
    width: 130px;
}

/* Vorauszahlung */
th:nth-child(10),
td:nth-child(10) {
    width: 140px;
}
tr:nth-child(even) {
    background: #fafafa;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 14px;
}

.actions {
    margin-top: 20px;
}

.actions .btn,
.actions button {
    margin-right: 10px;
    margin-bottom: 10px;
}

@media (max-width: 700px) {
    .page-wrapper {
        padding: 12px;
    }

    .site-header {
        padding: 15px;
    }

    .site-nav a {
        display: block;
        margin: 8px 0;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    th {
        display: none;
    }

    td {
        border: none;
        border-bottom: 1px solid #ddd;
    }
}
.coach-box {
    background: #fff4cc;
    border: 4px solid #d4a000;
    border-left: 12px solid #ff9900;
    padding: 22px;
    margin: 25px 0;
    border-radius: 10px;
    line-height: 1.6;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.coach-box strong:first-child {
    display: block;
    font-style: italic;
    font-size: 22px;
    color: #8a4b00;
    margin-bottom: 12px;
}

.coach-box p {
    margin-top: 10px;
    margin-bottom: 10px;
}

.coach-box small {
    color: #555;
}
.abrechnungsart-deaktiviert {
    color: #ffffff;
}
/* =========================================================
   AbrechnungsCoach
========================================================= */

.coach-box {
    padding: 18px;
    margin: 20px 0;
    border-radius: 8px;
    line-height: 1.6;
}

.coach-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 28px;
}

.coach-box.warnung {
    background: #fff6d8;
    border-left: 8px solid #f0a000;
    color: #333333;
}

.coach-stopmeldung {
    background: #ffcccc !important;
    border: 5px solid #cc0000 !important;
    color: #8b0000 !important;
    padding: 22px !important;
    margin: 20px 0 !important;
    font-size: 18px !important;
    font-weight: bold !important;
    border-radius: 10px !important;
    box-shadow: 0 0 16px rgba(204, 0, 0, 0.45) !important;
}
.coach-title {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 20px;
}

.coach-icon {
    width: 220px;
    height: auto;
    object-fit: contain;
}
.breadcrumbs {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: #1f5f99;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumbs span {
    margin: 0 6px;
}
.site-header {
    background: #165a99;
    color: #ffffff;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo a {
    color: #ffffff;
    text-decoration: none;
    font-size: 30px;
    font-weight: bold;
}
.logo img {
    height: 55px;
    width: auto;
    display: block;
}

.site-header {
    background: #7cbaf5;
    color: #ffffff;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.site-nav a {
    color: #525151;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 0;
    transition: 0.2s;
    font-size: 16px;
}

.site-nav a:hover {
    color: #d7f0ff;
}
.site-nav a.aktiv {
    color: #d7ff9f;
    border-bottom: 3px solid #d7ff9f;
    padding-bottom: 4px;
}
/* =========================================================
   Smartphone-Optimierung für kosten.php
   ========================================================= */

@media (max-width: 768px) {

    body {
        font-size: 16px;
    }

    .container,
    .content,
    main {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        box-sizing: border-box;
    }

    h1, h2, h3 {
        line-height: 1.25;
        word-break: break-word;
    }

    form {
        width: 100%;
    }

    table {
        width: 100%;
        border-collapse: collapse;
    }

    /* Tabellen auf Smartphone in Karten verwandeln */
    table thead {
        display: none;
    }

    table,
    table tbody,
    table tr,
    table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    table tr {
        margin-bottom: 16px;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    table td {
        border: none;
        padding: 8px 0;
    }

    table td::before {
        content: attr(data-label);
        display: block;
        font-weight: bold;
        margin-bottom: 4px;
        color: #555;
    }

    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 16px;
        padding: 9px;
    }

    button,
    .button,
    input[type="submit"] {
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
        padding: 12px;
        font-size: 16px;
        box-sizing: border-box;
    }

    .btn-row,
    .button-row,
    .form-buttons {
        display: block;
        width: 100%;
    }

    .btn-row a,
    .button-row a,
    .form-buttons a {
        display: block;
        width: 100%;
        margin-top: 8px;
        text-align: center;
        box-sizing: border-box;
    }
}

/* =========================================================
   Auth-Seiten: login / register / logout
   ========================================================= */

.auth-wrapper {
    max-width: 760px;
    margin: 30px auto 40px auto;
    padding: 0 16px;
}

.auth-card {
    background: #ffffff;
    border: 2px solid #d9e7ff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 18px;
    text-align: center;
    color: #123a7a;
}

.auth-subbox {
    max-width: 560px;
    margin: 0 auto 18px auto;
    padding: 14px 18px;
    border: 2px solid #0b5ed7;
    border-radius: 10px;
    background: #f4f8ff;
    text-align: center;
    font-size: 17px;
    font-weight: bold;
}

.auth-subbox a {
    color: #0b5ed7;
    text-decoration: underline;
}

.auth-meldung {
    max-width: 560px;
    margin: 0 auto 18px auto;
    padding: 14px 18px;
    border-radius: 10px;
    background: #eef9ef;
    border: 1px solid #b8e0bd;
    line-height: 1.5;
}

.auth-meldung.fehler {
    background: #fff3f3;
    border: 1px solid #e4b4b4;
}

.auth-meldung.erfolg {
    background: #eef9ef;
    border: 1px solid #b8e0bd;
}

.auth-form {
    max-width: 560px;
    margin: 0 auto;
}

.auth-form label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: bold;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #b9c7dc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    background: #fff;
}

.auth-form input:focus {
    outline: none;
    border-color: #0b5ed7;
    box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.12);
}

.auth-checkbox {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.auth-actions {
    margin-top: 22px;
    text-align: center;
}

.auth-button {
    display: inline-block;
    min-width: 190px;
    padding: 12px 20px;
    background: #0b5ed7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.auth-button:hover {
    background: #094fb7;
    color: #ffffff;
}

.auth-button.secondary {
    background: #ffffff;
    color: #0b5ed7;
    border: 2px solid #0b5ed7;
}

.auth-button.secondary:hover {
    background: #f4f8ff;
    color: #0b5ed7;
}

.auth-links {
    margin-top: 18px;
    text-align: center;
    line-height: 1.8;
}

.auth-links a {
    color: #0b5ed7;
    text-decoration: underline;
}

.auth-center {
    text-align: center;
}

/* Smartphone */
@media (max-width: 768px) {
    .auth-wrapper {
        margin: 18px auto 28px auto;
        padding: 0 10px;
    }

    .auth-card {
        padding: 20px 14px;
        border-radius: 12px;
    }

    .auth-card h1 {
        font-size: 30px;
        line-height: 1.2;
    }

    .auth-subbox,
    .auth-meldung,
    .auth-form {
        max-width: 100%;
    }

    .auth-form input[type="text"],
    .auth-form input[type="email"],
    .auth-form input[type="password"] {
        font-size: 16px;
        padding: 12px;
    }

    .auth-button {
        width: 100%;
        min-width: 0;
    }
}