body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
    color: #222;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}


html {
    height: 100%;
    margin: 0;
    padding: 0;
}
.drk-header {
    background: #ffffff;
    border-bottom: 4px solid #c00000;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo .cross {
    font-size: 28px;
    font-weight: bold;
    color: #c00000;
}

main {
    flex: 1; /* nimmt den verfügbaren Platz ein */
}

.logo .text {
    font-weight: 600;
    letter-spacing: 0.03em;
}

nav a {
    margin-left: 15px;
    text-decoration: none;
    color: #c00000;
    font-weight: 500;
}

nav a:hover {
    text-decoration: underline;
}

.content {
    padding: 20px;
}

.drk-footer {
    background: #ffffff;
    border-top: 1px solid #ddd;
    text-align: center;
    padding: 12px 0;
    font-size: 0.9rem;
    margin-top: auto;
}

/* Smooth Page Transition (nur Main-Bereich) */
main {
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

main.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* USER DROPDOWN */
.user-menu {
    position: relative;
    display: inline-block;
    margin-left: 15px;
}

.user-btn {
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 15px;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999;
}

.user-dropdown a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
}

.user-dropdown a:hover {
    background: #f2f2f2;
}

.user-menu:hover .user-dropdown {
    display: block;
}

/* Timeout Popup */
.timeout-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.timeout-box {
    background: white;
    padding: 25px 30px;
    border-radius: 10px;
    text-align: center;
    width: 320px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.table th, .table td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 14px;
}

.table th {
    background: #f0f0f0;
    text-align: left;
}

.btn {
    display: inline-block;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 3px;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: #c00000;
    color: #fff;
    border-color: #c00000;
}

.btn-secondary {
    background: #ffffff;
    color: #c00000;
    border-color: #c00000;
}

.btn-danger {
    background: #900000;
    color: #fff;
    border-color: #900000;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 3px;
}
/* Container */
.admin-menu {
    position: relative;
    display: inline-block;
    font-family: inherit;
}

/* Button */
.admin-btn {
    margin-left: 15px !important;
    background: #c00000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.admin-menu {
    position: relative;
    display: inline-block;
    font-family: inherit;
}

/* Button */
.admin-btn {
    margin-left: 15px !important;
    background: #c00000;
    color: #fff;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, box-shadow 0.2s;
}

.admin-btn:hover {
    background: #a30000;
    box-shadow: 0 4px 10px rgba(192,0,0,0.35);
}

/* Dropdown-Grundzustand */
.admin-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;              /* kleiner Abstand, aber kein Gap */
    background: #fff;
    border-radius: 10px;
    min-width: 200px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 1px solid #e5e5e5;
    z-index: 1000;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.15s ease-out,
                transform 0.15s ease-out,
                visibility 0.15s;
}

/* Dropdown sichtbar, solange man über .admin-menu ist (Button ODER Dropdown) */
.admin-menu:hover .admin-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Links im Dropdown */
.admin-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, padding-left 0.15s;
}

.admin-dropdown a:hover {
    background: #f8f8f8;
    padding-left: 20px;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.status-badge {
    padding: 4px 10px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    display: inline-block;
    font-size: 0.9em;
    background-color: #6c757d; /* Standard-Hintergrund (grau), falls keine spezielle Klasse passt */
}

.status-einsatzbereit {
    background-color: #28a745; /* grün */
}

.status-nicht-einsatzbereit {
    background-color: #ff00e6; /* blau */
}

.status-einsatzbereit-verliehen {
    background-color: #0004ff; /* Bootstrap warning */
}

.status-defekt {
    background-color: #dc3545; /* rot */
}

.status-in-reparatur {
    background-color: #fd7e14; /* orange */
}

.status-ausgemustert {
    background-color: #6c757d; /* grau */
}
.check-badge {
    padding: 4px 10px;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    display: inline-block;
    font-size: 0.9em;
}

.check-green { background-color: #28a745; }
.check-yellow { background-color: #ffc107; color: black; }
.check-red { background-color: #dc3545; }
.check-grey { background-color: #6c757d; }

.table-docs .doc-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 500;
}

.doc-icon {
    font-size: 18px;
}

.doc-link {
    color: #004085;
    text-decoration: none;
}

.doc-link:hover {
    text-decoration: underline;
}

.doc-ext {
    opacity: 0.6;
}

.doc-actions {
    display: flex;
    gap: 6px;
}

.rename-form {
    display: none;
    margin-top: 8px;
}

.rename-box {
    display: flex;
    gap: 6px;
    align-items: center;
}

.rename-input {
    width: 200px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.doc-date {
    color: #666;
    font-size: 14px;
}
