html, body {
    overflow: hidden; /* 🔥 wichtig */
    margin: 0;
    padding: 0;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    font-size: 16px;
}

body {
    flex-direction: column;
    display: block; /* 🔥 statt flex */
    height: 100vh; /* 🔥 wichtig */
}

h1, h2, h3 {
    margin: 0 0 10px 0;
}

select, input {
    font-size: 18px;
}

/* --- Globale Akzentfarbe --- */
:root {
    --accent-color: #05A7E1;
    --accent-color-dark: #0056b3;
    --light-grey: #dadada;
    --dark-grey: #cfcfcf;
    --menu-height: 50px;
}

.abstand-10 {
    margin-bottom: 10px;
}

.abstand-30 {
    margin-bottom: 30px;
}

#all-up {
    flex: 1;
    width: 95%;
    margin: 0 auto;
    padding: 70px 14px 14px 14px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    position: relative;
    margin-left: 20px;
    height: 92%;
    display: flex;
    flex-direction: column;
}

.scroll {
    overflow: auto;
}

#nachObenButton {
    display: none; /* Den Button standardmäßig ausblenden */
    position: fixed;
    bottom: 7mm;
    right: 7mm;
    padding: 10px;
    background-color: var(--dark-grey);
    color: #fff;
    font-size: 32px;
    text-decoration: none;
    border-radius: 5px;
    height: 30px;
    width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Setze einen höheren Wert als die anderen Elemente */
}

.page-break {
    page-break-before: always; /* Oder: page-break-after */
}

#logo {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
}

#logo img {
    height: 50px;
    width: auto;
}

.success-tooltip,
.error-tooltip {
    position: fixed;
    top: 20mm;
    right: 30mm;
    width: 60mm;
    background-color: var(--accent-color);
    color: white;
    padding: 10px;
    border-radius: 5px;
    z-index: 9999;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
}

.error-tooltip {
    background-color: #d9534f;
}

#customTooltip {
    position: fixed;
    z-index: 9999;
    background: #222;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    max-width: 250px;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;   /* bewusst gesetzt */
    transform: translateY(5px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#customTooltip.show {
    opacity: 1;
    visibility: visible;  /* wichtig */
    transform: translateY(0) scale(1);
}


.info-icon:hover {
    color: #000;
}

/* readonly look */
.readonly {
    background: #dadada;
    opacity: 0.6;
    cursor: not-allowed;
}

.input-with-info {
    display: flex;
    align-items: center;
    gap: 1px;
}

/* Input soll flexibel bleiben */
.input-with-info .login-input {
    flex: 1;
}

/* Icon bleibt kompakt */
.info-icon {
    cursor: pointer;
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}

.locked {
    background: #f8f8f8;
    opacity: 0.7;
    pointer-events: none;
}

.not-used {
    background: #fff3cd; /* gelb */
}

.locked.not-used {
    background: #fff; /* gelb */
    color: #fff; /* gelb */
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}





/*Login und Ersteinrichtung*/
#form {
    max-width: 550px;
    margin: 20px;
    padding: 25px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border: 2px solid #e5e7eb;
}

.login-label {
    display: block;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.login-input {
    width: 95%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}

.login-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(0,123,255,0.3);
    outline: none;
}

button {
    width: max-content;
    padding: 10px 25px 10px 25px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s;
    /*box-shadow: 0 0 5px #666;*/
}

button:hover {
    background: var(--accent-color-dark);
}

.login-select {
    width: 101%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border 0.2s, box-shadow 0.2s;
}
/*Ende Login*/

/* --- Menüleiste --- */
.menuebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--menu-height);
    background-color: #dadada;
    border-bottom: 2px solid var(--accent-color);
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow-x: auto;
}

/* --- Liste horizontal --- */
.menuebar ul {
    list-style: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: flex-end; /* aktive Tabs wirken oben */
    height: 50px;
    margin-left: 100px;
}

/* --- Menüitems --- */
.menuebar li {
    margin-right: 2px;
}

/* --- Links (Tabs) --- */
.menuebar a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    padding: 10px 15px;
    display: inline-block;
    border-radius: 5px 5px 0 0; /* oben abgerundet */
    border: 1px solid transparent; /* Standard unsichtbar */
    transition: all 0.25s ease;
}

/* --- Inaktive Tabs: dünner Rand oben, links, rechts --- */
.menuebar a:not(.active) {
    border-top: 1px solid #aaa;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    background-color: #f5f5f5;
    padding: 9px 14px; /* minimal kleiner als aktiv */
}

/* --- Hover Effekt --- */
.menuebar a:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* --- Aktiver Tab --- */
.menuebar a.active {
    background-color: var(--accent-color);
    color: #fff;
    font-size: 1.1em;
    padding: 12px 18px;
    border: 1px solid var(--accent-color);
    box-shadow: 0 -3px 0 #05A7E1 inset; /* hervorgehobener Reiter */
}
/* --- Ende Menüleiste --- */

/*Posteingangsbuch*/
.arrow {
    font-size: 1.5em;
    margin-left: 5px;
    color: #05A7E1;
    background: var(--dark-grey);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}


/* --- Wrapper für Scrollbereich --- */
.table-wrapper {
    flex: 1; /* Füllt den restlichen Platz aus */
    width: 100%;
    max-width: 100%;
    overflow: auto;
}


/* --- Tabelle --- */
.table-wrapper table {
    border-collapse: separate;  /* unbedingt für sichtbare Ränder bei sticky */
    border-spacing: 1pt;          /* Zellen direkt nebeneinander */
    width: max-content;
    min-width: 100%;
}

/* --- Sticky Header --- */
.table-wrapper thead th {
    position: sticky;
    top: 0;
    background: #f0f0f0;
    z-index: 10;
    border: 1px solid var(--accent-color);
    box-shadow: 2px 2px 1px var(--accent-color); /* simuliert den unteren Rand */
    min-width: min-content;
}

.table-wrapper thead th a {
    display: inline-flex;      /* flex statt inline/block */
    align-items: center;       /* vertikal zentriert */
    white-space: nowrap;       /* verhindert Zeilenumbruch */
}

.table-wrapper thead th .arrow {
    margin-left: 4px;          /* Abstand zwischen Text und Pfeil */
    font-size: 1.5em;
}

/* --- Spalten --- */
th, td {
    border: 1px solid #ccc;
    padding: 6px 8px;
    text-align: left;
}

/* --- Zeilen styling --- */
tr:nth-child(even) {
    background: #fafafa;
}

/* --- Jahreszeilen --- */
.month-row {
    background-color: #cfcfcf;
    color: #000;
    font-weight: bold;
    text-align: left;
}

/* --- optional: Abstände zwischen Jahreszeile und erstem Datensatz --- */
.month-row  + tr {
    /* optionaler Abstand, damit Sticky-Header nicht überlappt */
    padding-top: 2px; 
}
a { 
    text-decoration: none; 
    color:var(--accent-color); 
}

a:hover { 
    text-decoration: none; 
}

.post-vorgang {
    width: 100px;
}

.post-docid {
    width: 130px;
}

.post-anzahl {
    width: 150px;
}

.post-search-bar {
    display: flex;
    width: 950px;
    gap: 10px;
    align-items: center;
    /*background-color: #0056b3;*/
        padding: 10px 14p
}

.post-live-search {
    width: 700px;       /* Basis */
    max-width: 700px;   /* wichtig */
    /*flex: 1;           /* erlaubt Schrumpfen */
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.post-reset-btn {
    flex: 0 0 auto; /* Button bleibt fix */
    padding: 10px 14px;
    cursor: pointer;
    display: none;
    width: 150px;       /* Basis */
    /*max-width: 100px;   /* wichtig */
}

mark {
    background: var(--accent-color);
    padding: 0 2px;
    border-radius: 3px;
}

/*Ende Posteingangsbuch*/


/*Vertrag*/
.budget-cell {
    position: relative;
    background-color: #eee;
    width: 100%;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
}

.budget-bar {
    height: 100%;
    text-align: right;
    padding-right: 4px;
    color: #fff;
    font-weight: bold;
    box-sizing: border-box;
    transition: width 0.3s ease;
}

.budget-bar.green {
    background-color: #4caf50;
}

.budget-bar.red {
    background-color: #ff4d4d;
}


/*Vertrag und Dashboard*/
.vertrag-detail-card {
  max-width: 900px;
  margin: 20px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;   
  overflow: auto;
  box-shadow: 0 6px 25px rgba(0,0,0,0.08);
}

.vertrag-detail-table {
  width: 100%;
  border-collapse: collapse;
}

.vertrag-detail-table th {
  width: 30%;
  text-align: left;
  padding: 14px 16px;
  background: #f7f7f7;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  color: #333;
}

.vertrag-detail-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #222;
}

.vertrag-detail-table th.table-head-top {
    width: 150px;
}

.vertrag-detail-table tr:hover td {
  background: #f9fbff;
}


.dashboard-year-tabs {
    display: flex;
    align-items: flex-end;
    border-bottom: 2px solid var(--accent-color);
    padding: 0 20px;
}

.dashboard-year-tab {
    margin-right: 2px;
    font-weight: bold;
    padding: 9px 14px;
    border-radius: 5px 5px 0 0;
    border: 1px solid transparent;
    background-color: #f5f5f5;
    cursor: pointer;
    width: max-content;
}

.dashboard-year-tab:not(.active) {
    border: 1px solid #aaa;
    border-bottom: none;
    color: #000;
}

.dashboard-year-tab.active {
    background-color: var(--accent-color);
    color: #fff;
    padding: 12px 18px;
    border: 1px solid var(--accent-color);
}

.dashboard-tab-content {
    display: none;
}

.dashboard-tab-content.active {
    display: block;
}

.dashboard-vertrag-detail-card {
    border: 1px solid var(--accent-color);
    border-top: none;
    padding: 15px;
    background: #fff;
}

.dashboard-budget-alert {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 10px;
    border-radius: 8px;
    margin: 20px;
    font-weight: bold;
    width: 880px;
}
/*Ende Vertrag und Dashboard*/


/*PDF-Verifizierung*/
.verify-box { 
    padding: 20px; 
    border: 1px solid #ccc; 
    border-radius: 10px; 
}

.verify-ok { 
    color: green; 
    font-weight: bold; 
}

.verify-fail { 
    color: red; 
    font-weight: bold; 
}
/*Ende PDF-Verifizierung*/



/*PDF-Prüfung*/
.verify-container {
    max-width: 900px;
    margin: 30px auto;
    font-family: Arial, sans-serif;
}

.card {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card h3 {
    margin-top: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.hash {
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.result.valid {
    border-left: 6px solid #2ecc71;
}

.result.tampered {
    border-left: 6px solid #f39c12;
}

.result.error,
.result.not_found {
    border-left: 6px solid #e74c3c;
}

.big-status {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
}

.meta.green {
    border-left: 6px solid #2ecc71;
}

.meta.yellow {
    border-left: 6px solid #f1c40f;
}

.meta.red {
    border-left: 6px solid #e74c3c;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.card-header h3 {
    margin: 0;
}

.card-header .ampel {
    font-size: 20px;
    line-height: 1;
}

.scan-box {
    background: #111;
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

.scan-steps {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.scan-steps li {
    opacity: 0.3;
    padding: 6px 0;
    transition: 0.3s;
}

.scan-steps li.active {
    opacity: 1;
    color: #00ff99;
}

.scan-steps li.done {
    opacity: 0.6;
    color: #aaa;
}

.scan-bar {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 5px;
    overflow: hidden;
}

#scanProgress {
    width: 0%;
    height: 100%;
    background: #00ff99;
    transition: width 0.4s ease;
}

.loader-box {
    text-align: center;
    padding: 20px;
    color: #444;
}

.spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    border: 4px solid #ddd;
    border-top: 4px solid #333;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.check-time {
    margin-top: 5px;
    color: #666;
    font-size: 14px;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.result-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.result-table td:first-child {
    width: 200px;
    color: #555;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.action-buttons form {
    margin: 0;
}

.action-buttons button {
    min-width: 220px;
}

/*Ende PDF-Prüfung*/









/*responsive*/

@media (max-width: 1000px) {
    #all-up {
        padding-left: 5px;
        margin-left: 5px;
        padding-right: 5px;
        margin-right: 5px;
    }

    .vertrag-detail-card {
        margin: 2px;
    }

    .dashboard-budget-alert {
        margin: 5px 2px 5px 2px;
        width: 94%;
    }

    .menuebar ul {
        margin-left: 50px;
    }

    .nachobenicon {
        max-width: 25px;
    }
}

