.action-link {
    margin-top: 5px;
}

.col-actions a:hover {
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

footer {
    background-color: #f8fbfb;
    border-top: 3px solid var(--secondary);
    padding: 40px 5% 20px;
    color: #555;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.footer-info a {
    color: var(--secondary);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.footer-info a:hover {
    color: var(--primary);
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
}

.btn-primary:disabled,
.btn-primary[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.12);
    pointer-events: none;
}

.btn-primary:disabled:hover,
.btn-primary:disabled:active,
.btn-primary[disabled]:hover,
.btn-primary[disabled]:active {
    box-shadow: none;
    transform: none;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fceaea;
    color: #c0392b;
}

.alert-success {
    background: #e8f8f8;
    color: var(--secondary);
}

.btn-edit,
.btn-edit:link,
.btn-edit:visited,
.btn-edit:active {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--secondary);
    background: transparent;
    border: 1px solid transparent;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
}

.btn-edit:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

button.btn-edit {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
}

.btn-small { padding: 5px 10px; font-size: 0.85rem; }

.form-row {
    display: flex !important;
    flex-direction: row;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 30px;
    width: 100%;
}

.role-form {
    display: flex;
    gap: 5px;
    align-items: center;
    margin: 0;
    justify-content: flex-start;
}

.role-form .form-control-small { min-width: 75px; }

.col-actions button.btn-edit {
    margin-bottom: 5px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

.standard-form input:not([type="checkbox"]),
.standard-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
}

/* Checkbox-Label sauber links ausrichten */
.privacy-consent {
    display: flex;
    width: fit-content;
    align-items: flex-start;
    gap: 8px;
}

.privacy-consent input[type="checkbox"] {
    width: auto;
    margin: 2px 0 0 0;
    padding: 0;
    flex: 0 0 auto;
}

.privacy-consent label {
    display: inline;
    margin: 0;
    cursor: pointer;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.flex-2 { flex: 2; }
.flex-1 { flex: 1; }

.slug-preview {
    font-size: 0.8rem;
    color: #888;
    margin: 5px 0 0 0;
    position: absolute;
    transform: translateY(20px);
}

.link-spacing {
    margin-left: 15px !important;
    display: inline-block;
    vertical-align: middle;
}

.stats-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0 40px 0;
}

.stat-card {
    background: #fff;
    padding: 20px;
    flex: 1;
    min-width: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: #888;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0;
    color: var(--secondary);
}

.stat-link {
    display: inline-block;
    font-size: 0.8rem;
    text-decoration: none;
    color: #555;
    font-weight: 600;
}

.stat-link:hover {
    text-decoration: underline;
}

.border-threads { border-left: 5px solid var(--secondary); }
.border-tickets { border-left: 5px solid #e67e22; }
.border-comments { border-left: 5px solid #3498db; }
.border-categories { border-left: 5px solid #27ae60; }

tr.inactive-row {
    opacity: 0.6;
    background-color: #f9f9f9;
}

.text-success {
    color: #27ae60;
}

.threads-category-overview {
    position: sticky;
    top: 12px;
    z-index: 5;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafafa;
}

@media (max-width: 900px) {
    .threads-category-overview {
        top: 8px;
    }
}

.admin-overview-title {
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-chip {
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #ddd;
    font-weight: 600;
    color: #333;
    background: #fff;
}

.admin-chip.is-active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.admin-empty-note {
    color: #666;
    margin-top: 14px;
}

.admin-group {
    margin-top: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.admin-group-summary {
    cursor: pointer;
    padding: 10px 12px;
    font-weight: 600;
}

.admin-group-content {
    padding: 0 10px 10px 10px;
}

.admin-table-compact-top {
    margin-top: 0;
}

.comments-col-date,
.comments-col-author {
    width: 150px;
}

.images-upload-form {
    max-width: 560px;
    margin-bottom: 20px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.image-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.image-preview-link {
    display: block;
}

.image-preview {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    background: #f3f4f6;
    display: block;
}

.image-meta {
    margin-top: 8px;
}

.image-filename {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-usage-badge {
    margin-top: 4px;
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.image-usage-badge.is-free {
    background: #e8f8f8;
    color: var(--secondary);
}

.image-usage-badge.is-used {
    background: #fff4e5;
    color: #a35f00;
}

.image-usage-badge.is-locked {
    background: #edf2ff;
    color: #334155;
}

.image-details {
    color: #6b7280;
    font-size: 0.85rem;
}

.image-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.image-url-label {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #6b7280;
}

.image-url-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    font-size: 0.85rem;
    color: #374151;
    margin-top: 4px;
}

.image-delete-disabled {
    display: inline-block;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px 10px;
    opacity: 0.85;
}

.image-assign-form {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.image-assign-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.image-assign-form select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    font-size: 0.85rem;
    margin-bottom: 8px;
    background: #fff;
}

.image-assign-category-filter {
    margin-bottom: 6px;
}

.image-assign-thread-search {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.image-assign-match-count {
    font-size: 0.8rem;
    color: #64748b;
    margin: -2px 0 8px 0;
}

.image-assign-match-count.is-empty {
    color: #b45309;
    font-weight: 600;
}

.image-assign-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.image-assign-checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex: 0 0 auto;
}

.image-assign-submit {
    width: 100%;
}

.comments-col-actions {
    width: 180px;
}

.comment-thread-meta {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 5px;
    font-weight: bold;
}

@media (max-width: 900px) {
    footer {
        padding: 28px 4% 18px;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 14px 18px;
    }
}

@media (max-width: 600px) {
    .footer-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
