/* css/admin.css */

.admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 15px;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.admin-nav a:hover {
    text-decoration: underline;
}

/* Tabs */
.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.tab-btn {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
}
.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.kpi-value {
    font-size: 2em;
    font-weight: bold;
    margin-top: 10px;
}

.tickets-container {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* Titel Spalte: Text abschneiden wenn zu lang */
th:nth-child(3), td:nth-child(3) { 
    max-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Papierkorb Icon Style */
.btn-delete {
    background: none;
    border: none;
    color: var(--error-color);
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    line-height: 1;
}
.btn-delete:hover {
    color: #bd2130;
}

th {
    background-color: var(--secondary-color);
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
    cursor: pointer;
}

/* Indicator fur neues Nutzer-Kommentar */

tr.has-new-comment td {
    font-weight: bold;
}

td.col-id {
    position: relative;
    padding-left: 18px;
}

tr.has-new-comment td.col-id::before {
    content: "●";
    color: var(--accent-color);
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 14px;
}

.btn-danger {
    background-color: var(--error-color);
}
.btn-danger:hover {
    background-color: #bd2130;
}

.comments-section h3 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.comment {
    background-color: #fff;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border: 1px solid #eee;
    position: relative;
}

.comment.internal {
    background-color: #fffdf0;
    border: 1px solid #ffeeba;
    border-left: 4px solid #ffc107;
}

.comment.comment-admin {
    background-color: #eaf4ff;
    border-left: 4px solid var(--primary-color);
}

.comment.comment-member {
    background-color: #f9f9f9;
    border-left: 4px solid #ccc;
}

.comment-author {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.95em;
    margin-bottom: 5px;
}

.comment.internal .comment-author {
    color: #856404;
}

.comment-date {
    color: #888;
    font-size: 0.85em;
    position: absolute;
    top: 15px;
    right: 15px;
}

.comment-body {
    margin-top: 8px;
    line-height: 1.5;
    color: #444;
}

#admin-comment-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px dashed var(--border-color);
    margin-top: 30px;
}

.internal-badge {
    background: #ffeeba;
    color: #856404;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    margin-left: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #666;
}

.status-controls {
    background: #f8f9fa;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}
/* Responsive Table Hide Rules */
@media (max-width: 900px) {
    table {
        table-layout: auto !important;
    }
    th, td {
        width: auto !important;
    }
    th:nth-child(3), td:nth-child(3) { 
        max-width: none;
        white-space: normal;
    }
    .col-priority { display: none; }
}
@media (max-width: 750px) {
    .col-category { display: none; }
}
@media (max-width: 600px) {
    .col-id { display: none; }
}
@media (max-width: 500px) {
    .col-date, .col-visibility { display: none; }
}
@media (max-width: 400px) {
    .col-status { display: none; }
}


