/* MLM Gallery - Admin-Bereich Styles */

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 280px;
    background: var(--mlm-gradient);
    color: white;
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background-color: #f8f9fa;
    transition: margin-left 0.3s ease;
}

/* Sidebar Toggle Funktionalität */
.admin-wrapper.sidebar-collapsed .admin-sidebar {
    transform: translateX(-280px);
    transition: transform 0.3s ease;
}

.admin-wrapper.sidebar-collapsed .admin-main {
    margin-left: 0;
    transition: margin-left 0.3s ease;
}

.admin-sidebar {
    transition: transform 0.3s ease;
}

/* Sidebar Navigation */
.admin-sidebar .brand {
    padding: 0 2rem 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0;
}

.admin-sidebar .brand h2 {
    color: white;
    font-weight: 300;
    margin: 0;
}

.admin-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-item {
    margin: 0;
}

.admin-nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.admin-nav-link i {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

/* Navigation Groups */
.admin-nav-group {
    margin: 0;
}

.admin-nav-group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 1rem 2rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    text-align: left;
}

.admin-nav-group-toggle:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: white;
}

.admin-nav-group-toggle i:first-child {
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.admin-nav-group-toggle .group-icon {
    margin-left: auto;
    margin-right: 0;
    width: auto;
    transition: transform 0.3s ease;
}

.admin-nav-group-items {
    padding-left: 0;
    margin: 0;
    list-style: none;
    background-color: rgba(0, 0, 0, 0.1);
    display: none; /* Standard: eingeklappt */
}

.admin-nav-group-items .admin-nav-link {
    padding-left: 3.5rem;
    font-size: 0.9rem;
    font-weight: 400;
}

.admin-nav-group-items .admin-nav-link:hover,
.admin-nav-group-items .admin-nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Main Content */
.admin-header {
    background: white;
    padding: 1.5rem 2rem;
    margin: -2rem -2rem 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 0.5rem 0.5rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-header h1 {
    margin: 0;
    color: #333;
    font-weight: 400;
}

.admin-header .btn,
.admin-header .btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Cards */
.admin-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.admin-card h2 {
    margin-top: 0;
    color: #333;
    font-weight: 500;
}

/* Tables */
.admin-table {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-table table {
    margin: 0;
}

.admin-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.admin-table th {
    border: none;
    padding: 1rem;
    font-weight: 500;
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Buttons */
.btn-admin-primary {
    background: var(--bs-light);
    border: 1px solid #6c757d;
    color: #212529;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.btn-admin-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: #667eea;
}

/* Forms */
.admin-form {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-form .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: " *";
    color: var(--bs-danger);
}

.admin-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 0.375rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.admin-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Status Badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-owned {
    background-color: #d4edda;
    color: #155724;
}

.status-not-owned {
    background-color: #f8d7da;
    color: #721c24;
}

.status-ordered {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        height: auto;
    }

    .admin-main {
        margin-left: 0;
        padding: 1rem;
    }

    .admin-header {
        margin: -1rem -1rem 1rem;
        padding: 1rem;
    }

    .admin-wrapper {
        flex-direction: column;
    }
}

/* Accessibility */
.admin-nav-link:focus {
    outline: 2px solid white;
    outline-offset: -2px;
}

.admin-table th {
    position: relative;
}

.admin-table th[aria-sort]::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.admin-table th[aria-sort="ascending"]::after {
    content: '▲';
}

.admin-table th[aria-sort="descending"]::after {
    content: '▼';
}

/* Loading states */
.admin-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.admin-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Quick Actions */
.quick-actions {
    position: sticky;
    top: 0;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.quick-actions .btn {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Navigation Subgroups */
.admin-nav-subgroup {
    margin: 0;
    list-style: none;
}

.admin-nav-subgroup-label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 3.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-nav-subgroup-label i {
    margin-right: 0.5rem;
}

.admin-nav-subgroup-toggle {
    width: 100%;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.75rem 3.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.admin-nav-subgroup-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.05);
}

.admin-nav-subgroup-toggle .subgroup-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.admin-nav-subgroup-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-nav-subgroup-items .admin-nav-link {
    padding-left: 4.5rem;
    font-size: 0.875rem;
}

/* Disabled Links */
.admin-nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.admin-nav-link.disabled small {
    font-size: 0.7rem;
    font-style: italic;
}

/* Action Buttons - Reduced Padding */
.admin-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.admin-table .btn-group .btn-sm {
    min-width: 2rem;
    min-height: 2rem;
}

/* Timeline für Status-Historie */
.timeline {
    position: relative;
    padding-left: 0;
}

.timeline-item {
    position: relative;
    padding: 0.5rem 0;
    border-left: 2px solid #dee2e6;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
}

.timeline-item:last-child {
    border-left-color: transparent;
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.75rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #667eea;
    border: 2px solid #fff;
}

.timeline-item:first-child::before {
    background-color: #28a745;
}
