/* ==========================================================================
   GRUNDSTILE & TYPOGRAFIE
   ========================================================================== */
   
/* Body & allgemeine Textformatierung */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #121212;
    color: #e0e0e0;
    overflow-y: scroll;
    overflow-x: hidden;
}

/* Überschriften */
h1, h2, h3, h4, h5 {
    font-weight: 500;
    letter-spacing: 1px;
    color: #cccccc;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.4em; }
h3 { font-size: 1.3em; }
h4 { font-size: 1.2em; }
h5 { font-size: 1.1em; }

small {
    font-size: 70%;
}

/* Links */
a {
    color: #1b74da;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #666666;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
header {
    background-color: #1f1f1f;
    border-bottom: 1px solid #333333;
    height: 60px;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
}

@media only screen and (max-width: 768px) {
    header {
        padding: 0 15px;
    }
}

header #site_logo, header #site_logo svg {
    height: 40px;
    display: block;
}

header #site_logo_mobile, header #site_logo_mobile svg {
    display: none;
}

@media only screen and (max-width: 768px) {
    header #site_logo, header #site_logo svg {
        display: none;
    }
    header #site_logo_mobile, header #site_logo_mobile svg {
        height: 40px;
        display: block;
    }
}

header nav {
    height: 100%;
}

header nav ul {
    display: flex;
    list-style: none;
    flex-direction: row;
    margin: 0 30px 0 0;
    padding: 0;
    height: 100%;
}

header nav li {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 35px;
    color: #e0e0e0;
    font-size: 16px;
    text-decoration: none;
    list-style: none;
}

@media only screen and (max-width: 768px) {
    header nav ul {
        margin: 0;
    }
    header nav li {
        font-size: 15px;
        padding: 0 15px;
    }
}

header nav li:hover, header nav li.active {
    background-color: #333333;
    color: #999999;
}

/* ==========================================================================
   MAIN & FOOTER
   ========================================================================== */
main {
    padding: 20px;
    margin: 0 auto;
}

footer {
    position: relative;
    text-align: center;
    width: 100%;
    margin-top: 50px;
    font-size: 12px;
    color: #888888;
    background-color: #1f1f1f;
    padding: 10px 0;
}

footer a {
    text-decoration: none;
    color: #76c7c0;
}
footer a:hover {
    color: #9ee1d8;
}

/* ==========================================================================
   TABELLENSTILE
   ========================================================================== */
table {
    margin: 20px auto;
    border-collapse: collapse;
    width: 95vw;
    table-layout: fixed;
    background-color: #222;
    color: #e0e0e0;
    box-shadow: 6px 6px 0 rgba(125, 125, 125, 0.3);
    font-size: 0.85em;
    text-align: center;
}

table th, table td {
    padding: 5px;
    border: 1px solid #333;
    word-wrap: break-word;
    white-space: normal;
    height: 30px;
}

table th {
    background-color: #121212;
    font-weight: bold;
	vertical-align: middle;
}

table input, table select {
    background-color: #666666;
    color: #e0e0e0;
    border: 0;
    margin-top: 5px;
    max-width: 100%;
    box-sizing: border-box;
    width: 90%;
    font-size: 0.9em;
}

table input::placeholder {
    color: #e0e0e0;
}

table .filter_input {
    min-height: 20px;
}

tfoot tr, tfoot tr td {
    padding: 10px;
    background-color: #121212;
    border: 1px solid #333333;
}

/* Hover- und Click-Effekte */
table tbody tr:hover {
    background-color: #121212;
}

table tbody tr.clickable:hover, table tbody td.clickable:hover {
    cursor: pointer;
}

/* Sortierbare Spalten: Überschriften mit data-sort */
table th span[data-sort] {
    cursor: pointer;
    position: relative;
}
table th span[data-sort]:after {
    content: " \2195"; /* Doppelpfeil als Hinweis */
    font-size: 0.8em;
    color: #e0e0e0;
    margin-left: 5px;
}
table thead th[data-order] {
  color: green;
}

/* Optionen und Icons in Tabellenzellen */
table .table-action i, table .cell-action i {
    margin: 0 7px;
    font-size: 14px;
	cursor: pointer;
	color:blue;
}
table .table-action i:hover, table .cell-action i:hover {
	color:green;
}

/* Filterfelder in Tabellenkopf (in th) */
table thead th .filter_input {
    display: block;
    margin-top: 5px;
    width: 100%;
    padding: 4px;
    font-size: 0.9em;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #666666;
    color: #e0e0e0;
}

table thead th .filter_input[type="time"] {
    width: 60px;
}

@media screen and (max-width: 768px) {
  /* Tabelle in Cards umwandeln */
  table {
    border: none;
    box-shadow: none;
	width:100%;
  }
  table thead {
    display: none; /* Kopfzeile ausblenden */
  }
  table tbody tr {
    display: block;
    margin: 10px 0;
    background-color: #222;
    border: 1px solid #333;
    box-shadow: 4px 4px 0 rgba(125,125,125,0.3);
    padding: 10px;
  }
  table tbody tr td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 5px 0;
    font-size: 0.9em;
  }
  table tbody tr td:before {
    content: attr(data-label) ": ";
    font-weight: bold;
    width: 40%;
    text-align: left;
    flex-shrink: 0;
  }
}


/* Statistik-Tabelle: Zusätzliche Zeilen für Kategorien */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.stats-table th, .stats-table td {
    padding: 8px;
    border: 1px solid #333;
    text-align: center;
}
.stats-table th {
    background-color: #121212;
}

/* ==========================================================================
   FORMULARSTILE
   ========================================================================== */
input, button, select {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #cccccc;
    color: #1f1f1f;
    transition: all 0.3s ease;
    min-height: 35px;
}
select option {
    color: #1f1f1f;
}
input[type="date"] {
    min-width: 120px;
    width: 120px;
}
input:disabled {
    background-color: #999;
}
input:focus, button:hover {
    background-color: #1b5e20;
    color: #ffffff;
}

.form_container {
    padding: 25px;
    background: #222;
    color: #e0e0e0;
    border: 1px solid #333;
    box-shadow: 6px 6px 0 rgba(125, 125, 125, 0.3);
}
.form_container_small {
    max-width: 300px;
}
.form_container_large {
    max-width: 500px;
}
.form_container_center {
    margin: 0 auto;
}
.form_container h1, .form_container h2 {
    margin-top: 0;
}
.form_container label {
    display: block;
    margin: 10px 0 5px;
}
.form_container input,
.form_container select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    margin-bottom: 10px;
}
.form_container input[type="time"],
.form_container input[type="number"], .custom-time {
    width: 25%!important;
}
.form_container button {
    margin-top: 15px;
    width: 100%;
    min-height: 40px;
	max-width:1000px;
}
.form_container .form-group {
    margin-bottom: 15px;
}

#login-2fa-container .login-2fa-input {
  width: 40px!important;
  height: 40px;
  text-align: center;
  font-size: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
}

/* Chrome, Safari, Edge, Opera */
#login-2fa-container input[type="number"]::-webkit-inner-spin-button,
#login-2fa-container input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
} 

/* Firefox */
#login-2fa-container input[type="number"] {
  -moz-appearance: textfield;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-container input[type="checkbox"] {
  width: 25px;
  height: 25px;
}

/* Tooltip für billed-indicator */
.billed-indicator {
    position: relative;
    display: inline-block;
}
.billed-indicator:hover::after {
    content: attr(data-billed-date); /* Datum wird aus dem data-Attribut ausgelesen */
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1b5e20;
    color: #fff;
    padding: 3px 6px;
    border-radius: 3px;
    white-space: nowrap;
    font-size: 0.8em;
    z-index: 10;
}

#entry-count {
  float: left;
  text-align: left;
  margin: 0.5em 0;
}

/* Dropdown für Pagination-Limit */
#pagination-limit-container {
  float: right;
  text-align: right;
  margin: 0.5em 0;
}
#pagination-limit {
    display: inline-block;
    font-size: 0.9em;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #666;
    color: #e0e0e0;
}

/* Button-Stile */
button, a.button {
    cursor: pointer;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #cccccc;
    color: #1f1f1f;
    transition: all 0.3s ease;
    width: 80%;
    max-width: 300px;
}
button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
    background-color: #999;
    color: #666;
    border: 1px solid #666;
}
button:disabled:hover {
    background-color: #cccccc;
    color: #666;
}
input:focus, button:hover {
    background-color: #1b5e20;
    color: #ffffff;
}

/* Zusätzliche Klassen für Fehlermeldungen */
.error {
    background: #fdd;
    color: #900;
    padding: 10px;
    margin-bottom: 10px;
}
.success {
    background: #dfd;
    color: #090;
    padding: 10px;
    margin-bottom: 10px;
}
.info {
    background: #ddf;
    color: #006;
    padding: 10px;
    margin-bottom: 10px;
}

/* ==========================================================================
   MODAL & POPUP
   ========================================================================== */
/* Modal Overlay (für Popup-Formulare) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none; /* Standardmäßig ausgeblendet */
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Modal Inhalt (Popup) */
.modal {
    background: #222;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 5px;
    max-width: 400px;
    width: 90%;
    box-shadow: 6px 6px 0 rgba(125, 125, 125, 0.3);
    color: #e0e0e0;
    position: relative;
}

/* Schließen-Schaltfläche im Modal */
.modal .close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #e0e0e0;
}

/* ==========================================================================
   FILTER-BEREICH
   ========================================================================== */
#filter-container {
    margin: 20px auto;
    max-width: 95vw;
    padding: 10px;
    background-color: #222;
    border: 1px solid #333;
    box-shadow: 6px 6px 0 rgba(125,125,125,0.3);
}
#filter-container h3 {
    margin: 0 0 10px;
    color: #cccccc;
    font-size: 1.2em;
}
#filter-container .form-group {
    margin-bottom: 10px;
    display: inline-block;
    vertical-align: top;
    margin-right: 15px;
}
#filter-container label {
    margin-right: 5px;
}
#filter-container input,
#filter-container select {
    padding: 5px;
    font-size: 14px;
    border: 1px solid #444444;
    border-radius: 4px;
    background-color: #cccccc;
    color: #1f1f1f;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
#pagination-container {
    margin: 20px auto;
    text-align: center;
}
#pagination-container .pagination-button {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 3px;
    background-color: #666666;
    color: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
	width: 35px;
	height: 35px;
}
#pagination-container .pagination-button:hover {
    background-color: #1b5e20;
}
#pagination-container .pagination-button.active {
    background-color: #1b5e20;
    font-weight: bold;
}

/* ==========================================================================
   MISC & HILFSKLASSEN
   ========================================================================== */
/* Utility Klassen für Margins */
.mb1 { margin-bottom: 10px; }
.mb2 { margin-bottom: 20px; }
.mb3 { margin-bottom: 30px; }
.mb4 { margin-bottom: 40px; }
.mb5 { margin-bottom: 50px; }
.mb10 { margin-bottom: 100px; }
.mt1 { margin-top: 10px; }
.mt2 { margin-top: 20px; }
.mt3 { margin-top: 30px; }
.mt4 { margin-top: 40px; }
.mt5 { margin-top: 50px; }
.mt10 { margin-top: 100px; }

/* Status-Tags */
.statustag {
    padding: 5px 10px;
    margin-left: 25px;
    border-radius: 999px;
    font-size: 0.6em;
    font-weight: 400;
    color: #fff;
}
.status_active {
    background-color: darkgreen;
}
.status_archived {
    background-color: darkblue;
}

.clearfix {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.clearfix #entry-count,
.clearfix #pagination-limit-container {
  float: none;
}
