/* Rechnungssoftware Web-App - schlichtes, professionelles Buero-Design,
   angelehnt an das Muster der BiKaTech-Dispo-Webapp fuer ein konsistentes
   BiWo-Erscheinungsbild. */
:root {
    --dunkelblau: #1f3a5f;
    --dunkelblau_hell: #2c4f7c;
    --hintergrund: #f4f6f8;
    --karte: #ffffff;
    --rand: #dbe1e8;
    --text: #1c2733;
    --text_schwach: #5b6b7c;
    --erfolg: #1e7e34;
    --erfolg_bg: #e6f4ea;
    --fehler: #a31515;
    --fehler_bg: #fbe8e8;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--hintergrund);
    color: var(--text);
    font-size: 14px;
}

a { color: var(--dunkelblau); text-decoration: none; }
a:hover { text-decoration: underline; }

.layout { display: flex; min-height: 100vh; }

.seitenleiste {
    width: 220px;
    background: var(--dunkelblau);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.seitenleiste .logo {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-weight: 600;
    font-size: 16px;
}
.seitenleiste ul { list-style: none; margin: 0; padding: 8px 0; }
.seitenleiste ul li a {
    display: block;
    padding: 9px 18px;
    color: #e8edf3;
}
.seitenleiste ul li a:hover { background: var(--dunkelblau_hell); text-decoration: none; }
.seitenleiste ul li a.aktiv { background: var(--dunkelblau_hell); font-weight: 600; border-left: 3px solid #fff; }
.seitenleiste_fuss {
    margin-top: auto;
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.seitenleiste_fuss a { color: #cfe0f0; }
.online_widget { font-weight: 600; }

.inhalt { flex: 1; padding: 24px 32px; max-width: 1400px; }

h1 { font-size: 20px; margin: 0 0 18px; }
h2 { font-size: 16px; margin: 24px 0 10px; }

.karte {
    background: var(--karte);
    border: 1px solid var(--rand);
    border-radius: 4px;
    padding: 18px;
    margin-bottom: 18px;
}

table { width: 100%; border-collapse: collapse; background: var(--karte); }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--rand); text-align: left; }
th { background: #eef1f5; font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--text_schwach); }
tr:hover td { background: #f8fafc; }

.werkzeugleiste { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.werkzeugleiste input[type=text] { padding: 7px 9px; border: 1px solid var(--rand); border-radius: 3px; }

.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--dunkelblau);
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13.5px;
}
.btn:hover { background: var(--dunkelblau_hell); text-decoration: none; }
.btn.sekundaer { background: #fff; color: var(--dunkelblau); border: 1px solid var(--dunkelblau); }
.btn.gefahr { background: var(--fehler); }
.btn.gefahr:hover { background: #7f1010; }
.btn.btn_klein { padding: 4px 10px; font-size: 12px; }

.hinweis { color: var(--text_schwach); font-size: 13px; }

form .feld { margin-bottom: 14px; }
form label { display: block; font-size: 12.5px; color: var(--text_schwach); margin-bottom: 4px; }
form input[type=text], form input[type=number], form input[type=date],
form input[type=password], form input[type=email], form select, form textarea {
    width: 100%;
    padding: 8px 9px;
    border: 1px solid var(--rand);
    border-radius: 3px;
    font-family: inherit;
    font-size: 14px;
}
.formular_grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }

.status_chip { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; }
.status_ok { background: var(--erfolg_bg); color: var(--erfolg); }
.status_inaktiv { background: #e2e8f0; color: #64748b; }
.status_entwurf { background: #e2e8f0; color: #64748b; }
.status_final, .status_versendet { background: #dbeafe; color: #1e40af; }
.status_bezahlt { background: var(--erfolg_bg); color: var(--erfolg); }
.status_teilweise_bezahlt { background: #fef3c7; color: #92400e; }
.status_ueberfaellig { background: var(--fehler_bg); color: var(--fehler); }
.status_storniert { background: #e2e8f0; color: #64748b; text-decoration: line-through; }
.status_angenommen { background: var(--erfolg_bg); color: var(--erfolg); }
.status_abgelehnt { background: var(--fehler_bg); color: var(--fehler); }
.status_abgelaufen { background: #e2e8f0; color: #64748b; }

.flash_liste { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 10px 14px; border-radius: 4px; font-size: 13.5px; }
.flash_erfolg { background: var(--erfolg_bg); color: var(--erfolg); }
.flash_fehler { background: var(--fehler_bg); color: var(--fehler); }

.login_seite { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--hintergrund); }
.login_karte { background: var(--karte); border: 1px solid var(--rand); border-radius: 6px; padding: 32px; width: 320px; }
.login_karte h1 { font-size: 18px; margin-bottom: 20px; text-align: center; }
.flash_liste_login { max-width: 320px; margin: 16px auto 0; }
