:root {
    --main: #6699cc;
    --main-dark: #336699;
    --main-light: #99cccc;
    --accent: #ffcc66;
}

/* Grundlayout */
body {
    font-family: Arial, sans-serif;
    margin: 10px;
    background: #f7f9fc;
}

/* Überschriften */
h1 {
    color: var(--main-dark);
    margin-bottom: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 14px;
    background: var(--main);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border: 1px solid var(--main-dark);
}

.btn:hover {
    background: var(--main-dark);
}

.btn-accent {
    background: var(--accent);
    color: black;
    border-color: #d4a843;
}

.btn-accent:hover {
    background: #e6b85c;
}

/* Mobile */
@media (max-width: 800px) {
    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ccc;
        padding: 10px;
        border-radius: 6px;
        background: white;
    }

    td {
        border: none;
        padding: 6px 0;
    }

    td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--main-dark);
        display: block;
    }
}

/* --- Layout-Container --- */
.edit-container {
    background: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px #ccd;
    max-width: 650px;
    margin: 0 auto;
}

h1 {
    color: var(--main-dark);
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-group label {
    font-weight: bold;
    color: var(--main-dark);
}

.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid var(--main-dark);
    border-radius: 4px;
    margin-top: 4px;
}

/* --- Datumseingaben  --- */
.form-group.inline {
    display: block;
}

.form-group.inline label {
    display: block;
    margin-bottom: 4px;
}

.form-group.inline input[type="date"] {
    width: 20ch;
    min-width: 20ch;
    display: block;
}

/* --- Autocomplete Box --- */
#person_suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid var(--main-dark);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    display: none;
    max-height: 260px;
    overflow-y: auto;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-5px);
    transition:
        opacity 0.15s ease-out,
        transform 0.15s ease-out;
}

#person_suggestions.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

#person_suggestions div {
    padding: 8px 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

#person_suggestions div:last-child {
    border-bottom: none;
}

#person_suggestions div:hover {
    background: var(--main-light);
}

/* --- Verleihhistorie Box --- */
.history-box {
    border: 1px solid #ccc;
    margin-top: 5px;
    padding: 5px;
    width: calc(100% - 2px); /* exakt wie Eingabefelder */
    max-width: 100%;
    height: 180px;
    overflow-y: auto;
    background: #fafafa;
    border-radius: 6px;
    box-sizing: border-box;
}

/* --- Buttonbereich --- */
.button-row {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.button-row .btn {
    flex: 1;
    text-align: center;
}

/* Delete Button inline */
.delete-inline-btn {
    background: red;
    color: white;
    border: 1px solid darkred;
}

.delete-inline-btn:hover {
    background: darkred;
}

/* --- Modal Overlay --- */
#confirmModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
}

input[disabled] {
    background: #eee !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* --- Modal Box --- */
#confirmBox {
    background: white;
    width: 420px;
    margin: 12% auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 15px #333;
    font-family: Arial, sans-serif;
}

#confirmBox h2 {
    margin-top: 0;
    color: var(--main-dark);
}

#confirmButtons {
    text-align: right;
    margin-top: 25px;
}

#confirmButtons button {
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid var(--main-dark);
}

#confirmButtons .cancel-btn {
    background: var(--main-light);
}

#confirmButtons .delete-confirm-btn {
    background: red;
    color: white;
    border-color: darkred;
}

