/* -----------------------------------------------------------
   GLOBAL
----------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background: #2f2f2f;
    color: #e2e2e2;
    font-family: sans-serif;
    margin: 20px;
    font-weight: 400;
}



/* -----------------------------------------------------------
   TABELLE (Tagesmuster)
----------------------------------------------------------- */

table {
    border-collapse: collapse;
    width: auto;
}

td {
    padding: 2px 6px;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 14px;
    color: #e2e2e2;
    font-weight: 400;
}

td:first-child { width: 110px; }
td:nth-child(2) { width: 70px; }
td:nth-child(3) { width: 140px; }

.holiday {
    background: #4a3f3f;
    font-weight: 500;
}

.sunday {
    background: #3a3a3a;
}



/* -----------------------------------------------------------
   EINTRÄGE (Blöcke)
----------------------------------------------------------- */

.entryblock {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 4px;
    line-height: 1.2;
    opacity: 0.88;
}

.size-1  { width: 40px; }
.size-2  { width: 60px; }
.size-3  { width: 80px; }
.size-5  { width: 120px; }
.size-8  { width: 160px; }
.size-13 { width: 220px; }

.entrywrapper {
    position: relative;
    display: inline-block;
    margin-right: 4px;
}

.entrymenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #444;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    font-size: 12px;
    opacity: 0.95;
}

.entrymenu a {
    color: #fff;
    text-decoration: none;
    margin-right: 10px;
}

.entrywrapper:hover .entrymenu {
    display: block;
}

.add {
    color: #9bbcff;
    font-weight: 500;
    text-decoration: none;
    margin-left: 6px;
    font-size: 16px;
    opacity: 0.9;
}



/* -----------------------------------------------------------
   FORMULARE (Bearbeiten / Hinzufügen)
----------------------------------------------------------- */

form {
    background: #3a3a3a;
    padding: 20px;
    border-radius: 6px;
    width: 320px;
    color: #e2e2e2;
    margin: 0 auto;
}

form input,
form select,
form button {
    width: 100%;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 14px;
}

form input,
form select {
    padding: 8px;
    border: 1px solid #555;
    background: #2f2f2f;
    color: #e2e2e2;
}

form button {
    background: #5a7db8;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
}

form button:hover {
    background: #6c8ed0;
}



/* -----------------------------------------------------------
   LOGIN-SEITE
----------------------------------------------------------- */

.login-container {
    background: #353535;
    padding: 28px;
    border-radius: 8px;
    width: 320px;
    margin: 80px auto;
    color: #e2e2e2;
    box-shadow: 0 0 12px rgba(0,0,0,0.25);
}

.login-container h2 {
    margin-top: 0;
    font-weight: 400;
    color: #e6e6e6;
}

.login-container label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.login-container input,
.login-container button {
    width: 100%;
    margin-bottom: 14px;
    border-radius: 4px;
    font-size: 14px;
}

.login-container input {
    padding: 8px;
    border: 1px solid #555;
    background: #2f2f2f;
    color: #e2e2e2;
}

.login-container button {
    background: #5a7db8;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}

.login-container button:hover {
    background: #6c8ed0;
}

.error {
    margin-top: 10px;
    color: #ff9999;
    font-size: 13px;
}

/* Login-Formular von den globalen form-Styles entkoppeln */
.login-container form {
    width: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
    border-radius: 0;
}

/* Login-Felder hart auf Containerbreite zwingen */
.login-container input,
.login-container button {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 14px;
}

.grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
}

.chartbox {
    background:#3a3a3a;
    padding:20px;
    border-radius:4px;
    border:1px solid #3a3a3a; /* praktisch unsichtbar */
}


.chartbox canvas {
    max-width:400px;
    max-height:400px;
    width:100% !important;
    height:auto !important;
    display:block;
    margin:0 auto;
}

h1, h2 {
    color:#e6e6e6;
}

.chartbox canvas {
    max-width:400px;
    max-height:400px;
    width:100% !important;
    height:auto !important;
    display:block;
    margin:0 auto;
}

.grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
}

@media (max-width: 500px) {
    .grid {
        grid-template-columns:1fr; /* Handy / kleines Fenster */
    }
}

.tabBtn {
    background:#444;
    color:#eee;
    border:1px solid #666;
    padding:8px 14px;
    border-radius:4px;
    cursor:pointer;
    font-size:14px;
}

.tabBtn.active {
    background:#666;
    border-color:#888;
}

.infoIcon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #333;          /* dunkler Kreis */
    border: 1px solid #888;    /* heller Rahmen */
    color: #eee;               /* helles i */
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
}

.infoIcon:hover {
    background: #444;
    border-color: #aaa;
}

