/* Grundlayout */
.user-plugin {
    font-family: Arial, sans-serif;
    color: #222;
    background: #fff;
    padding: 15px;
}

.user-header {
    margin-bottom: 1em;
    border-bottom: 2px solid #007acc;
}

.user-header h3 {
    margin: 0;
    color: #007acc;
}

/* Flex Container */
.container-flex {
    display: flex;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    width: 220px; /* fixe Sidebar-Breite */
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 1em;
}
/* Aktiver Menüpunkt */
.sidebar ul li a.button-link.active {
    background-color: #FDEAB3 !important;
    color: #222 !important;
}

.dropdown-kategorie {
    font-family: Arial, sans-serif;
    text-align:center;
    width:100%;
    height:35px;
    background-color:#555;
    color:#fff;
}

.sidebar ul li a.button-link {
    display: inline-block; /* block wäre ok, inline-block ermöglicht minimale Breite */
    width: 100%;           /* füllt die Sidebar-Breite */
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    white-space: nowrap;   /* verhindert Umbruch */
    overflow: hidden;
    text-overflow: ellipsis; /* falls doch mal zu lang */
}

.sidebar ul li a.button-link.btn-secondary {
    background-color: #555;
    color: #fff;
}

.sidebar ul li a.button-link.btn-secondary:hover {
    background-color: #444;
}

/* Suchformular */
.suchformular {
    background-color: #FAFAFA;
    padding: 10px;
    border: 1px solid #BBBBBB;
    border-radius: 7px;
    box-shadow: 0 3px 7px rgba(52,152,219,0.5);
}

.suchformular input[type="text"] {
    width: 90%;
    padding: 6px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.suchformular label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    font-size: 0.9em;
}

.suchformular .suchbutton {
    background-color: #DDDDDD;
    border-radius: 5px;
    box-shadow: 0 3px 7px rgba(52,152,219,0.5);
    color: black;
    border: none;
    padding: 7px 12px;
    cursor: pointer;
    width: 100%;
    font-weight: bold;
}

.suchformular .suchbutton:hover {
    background-color: #BBBBBB;
}

/* Content Area */
.content-area {
    flex: 1 1 auto;
	/*background-color: #D5E1F0;*/
}

/* Tabellen */
.notes-table {
    width: 100%;
    border-collapse: collapse;
    /*margin-top: 1em;*/
}

.notes-table th,
.notes-table td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
    text-align: left;
}

/* Angepasste Überschriften */
.notes-table th {
    background: #3399ff;  /* helleres Blau */
    color: #fff;       /* weiß */
    cursor: pointer;
    user-select: none;
}

.notes-table tr.notes-row-overdue {
    background: #ffdddd;
}

.notes-table tr.notes-row-today {
    background: #fff9d9;
}

.notes-table tr.notes-row-future {
    background: #e7f5e7;
}

.notes-table td.action-links a {
    margin-right: 6px;
    text-decoration: none;
    font-size: 1.1em;
}

.notes-status-done {
    color: green;
    font-weight: bold;
}

.notes-status-open {
    color: red;
    font-weight: bold;
}

/* Formulare */
.note-form {
    max-width: 600px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.note-form label {
    display: block;
    margin-top: 10px;
    margin-bottom: 4px;
    font-weight: bold;
}

.note-form input[type="text"],
.note-form input[type="datetime-local"],
.note-form select,
.note-form textarea {
    width: 100%;
    padding: 7px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.note-form textarea {
    resize: vertical;
}

.form-row-inline {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.form-field-small {
    flex: 1;
}

.btn-primary {
    margin-top: 15px;
    background: #007acc;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}

.btn-primary:hover {
    background: #005f99;
}

.cancel-link {
    margin-left: 15px;
    color: #777;
    text-decoration: none;
    font-size: 0.9em;
}

.cancel-link:hover {
    text-decoration: underline;
}

.btn-clear-date {
    background: #ccc;
    border: none;
    cursor: pointer;
    margin-left: 5px;
    font-size: 1.1em;
    padding: 0 6px;
    border-radius: 4px;
}

/* Statische Handbuchbereiche */
.helper-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.helper-section-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    background: #f7fbfe;
    color: #1f4f75;
    text-decoration: none;
}

.helper-section-card:hover {
    background: #e6f2fa;
    border-color: #2E7FC1;
}

.helper-section-card span {
    color: #555;
    font-size: 0.9em;
}

.helper-search {
    display: flex;
    gap: 8px;
    margin: 12px 0 18px;
}

.helper-search input {
    flex: 1 1 auto;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
}

.helper-search button,
.helper-back {
    display: inline-block;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: #2E7FC1;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.helper-tree {
    list-style: none;
    margin: 0;
    padding-left: 18px;
}

.helper-tree summary {
    cursor: pointer;
    padding: 5px 7px;
    border-radius: 4px;
}

.helper-tree summary:hover {
    background: #edf6fc;
}

.helper-folder > details > summary {
    font-weight: bold;
    color: #245b82;
}

.helper-description {
    margin: 5px 0 9px 18px;
    padding: 9px 11px;
    border-left: 3px solid #2E7FC1;
    background: #f7f7f7;
    line-height: 1.5;
}

.helper-error {
    padding: 10px;
    border: 1px solid #d79a9a;
    background: #f8d7da;
    color: #721c24;
}

.helper-notice {
    padding: 10px;
    border: 1px solid #8fc79f;
    background: #e9f7ef;
    color: #1d5b31;
}

.helper-entry-form {
    max-width: 760px;
}

.helper-entry-form label {
    display: block;
    margin: 12px 0 5px;
    font-weight: bold;
}

.helper-entry-form input,
.helper-entry-form select,
.helper-entry-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
}

.helper-entry-form .suchbutton {
    width: auto;
    margin-top: 14px;
}

.helper-cancel {
    display: inline-block;
    margin: 14px 0 0 10px;
    color: #555;
}

.helper-entry-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 10px 18px;
}

.helper-entry-actions form {
    margin: 0;
}

.helper-entry-actions .suchbutton,
.helper-delete {
    width: auto;
    margin: 0;
    padding: 6px 10px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

.helper-handbook-edit {
    margin: 12px 0 18px;
    padding: 14px;
    border: 1px solid #b9c7d3;
    border-radius: 6px;
    background: #f7fbfe;
}

.helper-handbook-edit textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 9px;
    font: inherit;
}

.helper-delete {
    background: #b83a3a;
}

.helper-delete:hover {
    background: #8f2929;
}

.helper-free-entries {
    margin-top: 24px;
    border-top: 1px solid #ccc;
    padding-top: 14px;
}

.helper-free-folder,
.helper-free-subfolder,
.helper-free-file {
    margin: 5px 0;
}

.helper-free-folder > summary,
.helper-free-subfolder > summary,
.helper-free-file > summary {
    cursor: pointer;
    padding: 7px 9px;
    border-radius: 4px;
    background: #f0f0f0;
}

.helper-free-folder > summary {
    font-weight: bold;
    color: #245b82;
}

.helper-free-subfolder,
.helper-free-files {
    margin-left: 18px;
}

/* Responsive */
@media (max-width: 720px) {
    .container-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 15px;
    }
}
