/* Admin Panel Styles */
.admin-container {
    background: var(--bg-color);
    padding: 2rem;
    margin-top: 64px; /* Space for navigation */
}

/* Mobile Menu Divider */
.mobile-menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

/* Admin Tab Link Styles */
.admin-tab-link {
    border: none;
    background: transparent;
    color: inherit;
    font-size: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab-link.active {
    color: var(--primary-color);
    background-color: rgb(37 99 235 / 0.1);
}

.admin-tab-link:hover {
    color: var(--primary-color);
    background-color: rgb(37 99 235 / 0.05);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-header h1 {
    color: var(--text-primary);
    font-size: 2rem;
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.admin-user-info i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.admin-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

/* Mobile Tab Selector - Remove as we're using hamburger menu */
.mobile-tab-selector {
    display: none;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
}

.tab-btn {
    flex: 1;
    padding: 0.8rem 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--surface-color);
}

.tab-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--surface-color);
}

.admin-tab {
    display: none;
    padding: 1.5rem;
    padding-bottom: 3rem;
}

.admin-tab.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.tab-header h2 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 0;
}

.admin-filters,
.admin-filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filters-row {
    justify-content: space-between;
}

.admin-filters select,
.admin-filters input,
.admin-filters-row select,
.admin-filters-row input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.8rem;
    min-width: 120px;
}

.admin-filters select:focus,
.admin-filters input:focus,
.admin-filters-row select:focus,
.admin-filters-row input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-filters input[type="search"],
.admin-filters-row input[type="search"] {
    min-width: 200px;
    flex: 1;
}

.admin-filters-row select {
    flex-shrink: 0;
    min-width: 150px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.2rem;
    background: var(--surface-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    padding-bottom: 2rem;
}

.admin-list::-webkit-scrollbar {
    width: 8px;
}

.admin-list::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.admin-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.admin-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.admin-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-item.used {
    opacity: 0.7;
}

.admin-item.inactive {
    opacity: 0.6;
    border-left: 3px solid #dc2626;
}

.admin-item.active {
    border-left: 3px solid #16a34a;
}

.item-status.active {
    background: #dcfce7;
    color: #16a34a;
}

.item-status.inactive {
    background: #fef2f2;
    color: #dc2626;
}

.item-info {
    flex: 1;
}

.item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.item-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.item-meta span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-token {
    background: var(--surface-color);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: monospace;
    font-size: 0.8rem !important;
}

.item-status {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem !important;
    font-weight: 500;
}

.item-status.used {
    background: #f3f4f6;
    color: #6b7280;
}

.item-status.unused {
    background: #dcfce7;
    color: #16a34a;
}

.item-role {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem !important;
    font-weight: 500;
}

.item-role.admin {
    background: var(--primary-color);
    color: white;
}

.item-role.super-admin {
    background: #dc2626;
    color: white;
}

.item-role.user {
    background: #f3f4f6;
    color: #6b7280;
}

.item-content {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-top: 0.5rem;
    color: var(--text-primary);
    border-left: 3px solid var(--primary-color);
}

.item-image {
    margin-top: 0.5rem;
}

.item-image img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.item-caption {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--text-secondary);
}

.item-used-by {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.item-actions .btn {
    white-space: nowrap;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    border: 1px solid transparent;
}

.badge-success {
    color: #166534;
    background-color: #dcfce7;
    border-color: #bbf7d0;
}

/* Base Button Styles */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--text-secondary);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Close button for modals */
.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.close-btn:hover {
    color: var(--text-primary);
}

/* Responsive actions */
/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .admin-container {
        padding: 1rem;
        margin-top: 64px;
    }
    
    .admin-content {
        border-radius: var(--radius-md);
        margin-top: 0;
    }
    
    /* Hide desktop tabs on mobile */
    .admin-tabs {
        display: none;
    }
    
    .tab-btn {
        flex: none;
        flex-direction: row;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        justify-content: flex-start;
        border-bottom: 1px solid var(--border-color);
        border-radius: 0;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .tab-btn.active {
        border-left: 4px solid var(--primary-color);
        border-bottom-color: var(--border-color);
        background: var(--bg-color);
    }
    
    .admin-tab {
        padding: 1rem;
    }
    
    .tab-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .tab-header h2 {
        font-size: 1.25rem;
    }
    
    .admin-filters {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .admin-filters select,
    .admin-filters input {
        width: 100%;
        min-width: unset;
    }
    
        /* Enhanced mobile list items */
    .admin-item {
        padding: 1.5rem;
        border-radius: 1rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        border: 1px solid #e2e8f0;
        background: white;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .item-info {
        gap: 0.75rem;
        flex: 1;
    }

    .item-title {
        font-size: 1.2rem;
        font-weight: 600;
        color: #1e293b;
        line-height: 1.4;
    }

    .item-meta {
        font-size: 0.85rem;
        flex-wrap: wrap;
        gap: 0.75rem;
        color: #64748b;
    }

    .item-meta span {
        background: transparent;
        padding: 0.3rem 0.6rem;
        border-radius: 0.375rem;
        white-space: nowrap;
    }

    /* Enhanced mobile buttons */
    .item-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        width: 100%;
        margin-top: 0.5rem;
    }

    .item-actions.single-action {
        grid-template-columns: 1fr;
    }

    .item-actions.three-actions {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .item-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
        font-size: 15px; /* iOS friendly */
        font-weight: 600;
        border-radius: 0.75rem;
        min-height: 48px; /* Touch target size */
        display: flex;
        align-items: center;
        gap: 0.5rem;
        transition: all 0.2s ease;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .item-actions .btn:active {
        transform: scale(0.98);
    }

    .item-actions .btn i {
        font-size: 1rem;
    }
    
        /* Form and action improvements */
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }

    .form-actions .btn {
        width: 100%;
        padding: 1rem;
        font-size: 16px;
        min-height: 48px;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .pagination button {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
        font-size: 14px;
    }
    
        /* Modal improvements */
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-width: none;
        border-radius: 1rem;
    }

    .modal-header {
        padding: 1.5rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .modal-header h3 {
        font-size: 1.3rem;
        font-weight: 600;
    }

    .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        background: #f1f5f9;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group label {
        font-size: 1rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
        border-radius: 0.75rem;
        border: 1px solid #cbd5e1;
        min-height: 48px;
    }
    
        /* Section improvements */
    .admin-section {
        margin-bottom: 2rem;
        padding: 1.5rem;
        background: white;
        border-radius: 1rem;
        border: 1px solid #e2e8f0;
    }

    .admin-section h3 {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 1rem;
    }

    .test-buttons,
    .backup-buttons,
    .import-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .test-buttons .btn,
    .backup-buttons .btn,
    .import-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 16px;
        min-height: 48px;
    }
    
    .admin-list {
        max-height: calc(100vh - 250px);
        padding-right: 0.25rem;
        padding-bottom: 3rem;
    }
    
    .places-info {
        padding: 1.5rem;
        /* border-radius: 1rem; */
        margin-bottom: 1.5rem;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    
    .pagination-controls button {
        min-width: 44px;
        min-height: 44px;
        padding: 0.75rem;
    }
    
    .test-result {
        padding: 1.5rem;
        border-radius: 1rem;
        margin: 1rem 0;
    }
    
    .test-result pre {
        font-size: 0.8rem;
        padding: 1rem;
        border-radius: 0.5rem;
        overflow-x: auto;
    }
    
    .warning-box {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 1rem;
        background: #fef3c7;
        border: 1px solid #fbbf24;
    }
    
    .item-content {
        gap: 1rem;
        flex-direction: column;
    }
    
    .item-image {
        width: 100px;
        height: 100px;
        border-radius: 0.75rem;
        overflow: hidden;
        flex-shrink: 0;
    }
    
    .item-image img {
        border-radius: 0.75rem;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .item-used-by {
        margin-top: 0.75rem;
        padding: 0.75rem;
        background: #f1f5f9;
        border-radius: 0.5rem;
        font-size: 0.9rem;
        color: #475569;
    }
}

/* Tablet Responsive Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .admin-container {
        padding: 1.5rem;
    }
    
    .admin-tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 150px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .admin-filters {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .admin-filters select,
    .admin-filters input {
        flex: 1;
        min-width: 150px;
    }
    
    .item-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .item-actions .btn {
        flex: 1;
        min-width: 120px;
        font-size: 0.9rem;
    }
    
    .test-buttons {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .test-buttons .btn {
        flex: 1;
        min-width: 150px;
    }
    
    .backup-buttons {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .backup-buttons .btn {
        flex: 1;
        min-width: 200px;
    }
    
    .import-buttons {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .import-buttons .btn {
        flex: 1;
        min-width: 150px;
    }
}

/* Places Info */
.places-info {
    padding: 0.8rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.places-info small {
    color: var(--text-muted);
}

/* Status styles for comments */
.admin-item.approved {
    border-left: 4px solid #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.admin-item.pending {
    border-left: 4px solid #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.item-status.approved {
    color: #22c55e;
    font-weight: 600;
}

.item-status.pending {
    color: #f59e0b;
    font-weight: 600;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.pagination-controls button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pagination-controls button:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.pagination-controls button.btn-outline-primary {
    background: var(--surface-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.pagination-controls button.btn-outline-primary:hover {
    background: var(--bg-color);
    border-color: var(--primary-color);
    color: var(--text-primary);
}

.pagination-controls button.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-controls button.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* API Tests Styles */
.admin-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.admin-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
}

.test-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.test-result {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.test-result.success {
    border-color: var(--success-color);
    background-color: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
}

.test-result.error {
    border-color: var(--error-color);
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.test-result.warning {
    border-color: var(--warning-color);
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}



.test-result strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* API Tests tab - scrollable content */
#api-tests-tab {
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 1rem;
    padding-bottom: 3rem;
}

#api-tests-tab h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

#api-tests-tab h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

#api-tests-tab::-webkit-scrollbar {
    width: 8px;
}

#api-tests-tab::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

#api-tests-tab::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

#api-tests-tab::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.test-results {
    /* Remove max-height constraint for better flow */
    overflow-y: visible;
}

.test-result pre {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.875rem;
    margin: 0.5rem 0;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.test-result pre::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.test-result pre::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.test-result pre::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.test-result pre::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

.text-muted {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

:root {
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

/* Backup/Restore Styles */
.backup-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
}

.warning-box strong {
    color: #dc3545;
}

.text-warning {
    color: #f39c12 !important;
} 

/* Kompakte Filterzeile */
.admin-filters-row, .admin-filters {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.admin-filters-row select, .admin-filters-row input[type="search"],
.admin-filters select, .admin-filters input[type="search"] {
    font-size: 0.85rem;
    padding: 0.35rem 0.7rem;
    border-radius: 6px;
    min-width: 120px;
}

.admin-filters-row input[type="search"], .admin-filters input[type="search"] {
    flex: 1;
    min-width: 180px;
}

/* Noch kleinere Buttons */
.btn, .item-actions .btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    min-width: 70px;
    min-height: 28px;
    border-radius: 5px;
}

.tab-header .btn {
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    min-height: 32px;
}

/* Kompaktere Karten */
.admin-item {
    padding: 0.8rem;
    border-radius: 7px;
}

@media (max-width: 600px) {
  .admin-filters-row, .admin-filters {
    flex-direction: row;
    gap: 0.5rem;
  }
  .btn, .item-actions .btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    min-width: 60px;
    min-height: 24px;
  }
  .admin-item {
    padding: 0.6rem;
  }
} 

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    position: relative;
    margin: 2% auto;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.image-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

#modalImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
} 

/* Media Sub-Tabs & Places Sub-Tabs */
.media-sub-tabs,
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.sub-tab-btn {
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sub-tab-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.sub-tab-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.media-sub-tab,
.sub-tab-content {
    display: none;
}

.media-sub-tab.active,
.sub-tab-content.active {
    display: block;
}

.media-sub-tab .admin-list,
.sub-tab-content .admin-list {
    max-height: 45vh;
    overflow-y: auto;
    padding-bottom: 2rem;
}

/* Admin Video Rows */
.admin-video-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.admin-video-row video {
    border-radius: 4px;
    width: 120px;
    height: 80px;
    object-fit: cover;
    background: #000;
}

.admin-video-row .video-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.admin-video-row .video-caption {
    font-weight: 500;
    color: #333;
}

.admin-video-row .video-uploader {
    font-size: 12px;
    color: #6c757d;
}

.admin-video-row .video-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.admin-video-row .video-status.pending {
    background: #fff3cd;
    color: #856404;
}

.admin-video-row .video-status.approved {
    background: #d4edda;
    color: #155724;
}

.admin-video-row .video-actions {
    display: flex;
    gap: 8px;
}

.admin-video-row .btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .media-sub-tabs {
        flex-direction: column;
        gap: 5px;
    }
    
    .admin-video-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .admin-video-row video {
        width: 100%;
        height: 120px;
    }
    
    .media-sub-tab .admin-list {
        max-height: 40vh;
        padding-bottom: 2rem;
    }
    
    .admin-video-row .video-actions {
        width: 100%;
        justify-content: flex-end;
    }
} 

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.stat-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.9rem;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.dashboard-section {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.dashboard-section h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.activity-item:hover {
    background: var(--surface-color);
    border-color: var(--primary-color);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.activity-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.quick-action-card:hover::before {
    transform: scaleY(1);
}

.quick-action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.quick-action-content {
    flex: 1;
}

.quick-action-content h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.quick-action-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.quick-action-arrow {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.quick-action-card:hover .quick-action-arrow {
    color: var(--primary-color);
    transform: translateX(4px);
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Modern loading with spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.loading .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Mobile responsive for dashboard */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-sections {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-content h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .quick-action-card {
        padding: 1rem;
    }
    
    .quick-action-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .quick-action-content h4 {
        font-size: 0.95rem;
    }
    
    .quick-action-content p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .activity-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Access Control Styles */
.btn.disabled,
.backup-buttons .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.disabled:hover,
.backup-buttons .btn.disabled:hover {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    transform: none;
}

.admin-section.access-denied {
    opacity: 0.6;
    filter: grayscale(0.3);
}

.admin-section.access-denied h3 {
    color: var(--text-secondary);
}

.admin-section.access-denied .text-muted {
    color: var(--text-secondary);
}

.admin-section.access-denied .backup-buttons {
    pointer-events: none;
} 

/* Dark Mode adjustments for admin page */
[data-theme="dark"] .admin-container {
    background: var(--bg-color);
}

[data-theme="dark"] .admin-content {
    background: var(--bg-color);
}

[data-theme="dark"] .admin-tabs {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .tab-btn {
    background: var(--surface-color);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

[data-theme="dark"] .tab-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

[data-theme="dark"] .tab-btn.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .admin-tab {
    background: var(--bg-color);
}

[data-theme="dark"] .tab-header h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-card {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .stat-card h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .stat-card p {
    color: var(--text-secondary);
}

[data-theme="dark"] .stat-icon {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .dashboard-section h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .activity-list {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .activity-item {
    border-color: var(--border-color);
}

[data-theme="dark"] .activity-item:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .activity-title {
    color: var(--text-primary);
}

[data-theme="dark"] .activity-meta {
    color: var(--text-secondary);
}

[data-theme="dark"] .quick-action-card {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .quick-action-card:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .quick-action-content h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .quick-action-content p {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-filters-row {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .admin-filters-row select,
[data-theme="dark"] .admin-filters-row input {
    background: var(--input-background);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .admin-list {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .admin-list-item {
    border-color: var(--border-color);
}

[data-theme="dark"] .admin-list-item:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .admin-list-item h4 {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-list-item p {
    color: var(--text-secondary);
}

[data-theme="dark"] .pagination {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination button {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .pagination button:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .pagination button.active {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .modal {
    background: var(--surface-color);
    color: var(--text-primary);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .modal-content {
    background: var(--surface-color);
    color: var(--text-primary);
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--input-background);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

[data-theme="dark"] .btn {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .btn-primary {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--primary-hover);
}

[data-theme="dark"] .btn-secondary {
    background: var(--surface-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .btn-danger {
    background: var(--danger-color);
    color: white;
}

[data-theme="dark"] .btn-danger:hover {
    background: #dc2626;
}

[data-theme="dark"] .btn-success {
    background: var(--success-color);
    color: white;
}

[data-theme="dark"] .btn-success:hover {
    background: #059669;
}

[data-theme="dark"] .btn-warning {
    background: var(--warning-color);
    color: white;
}

[data-theme="dark"] .btn-warning:hover {
    background: #d97706;
}

[data-theme="dark"] .btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] .btn-outline:hover {
    background: var(--bg-color);
}

[data-theme="dark"] .test-result {
    background: var(--surface-color);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .warning-box {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: var(--text-primary);
}

/* Import Tool Styles */
.import-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.import-buttons .btn {
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 36px;
}

.import-status {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.import-progress {
    margin-bottom: 1rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
}

.import-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.import-details .detail-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.import-details .detail-label {
    font-weight: 500;
}

.import-details .detail-value {
    color: var(--text-primary);
}

/* Dark theme for import tool */
[data-theme="dark"] .import-status {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .progress-bar {
    background: var(--border-color);
}

[data-theme="dark"] .import-details {
    color: var(--text-secondary);
}

[data-theme="dark"] .import-details .detail-value {
    color: var(--text-primary);
}

/* Statistics Tab Styles */
.statistics-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.statistics-filters select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 150px;
}

.statistics-filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.statistics-chart {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.statistics-list {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.statistics-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.statistics-item:last-child {
    border-bottom: none;
}

.statistics-item .item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.statistics-item .item-value {
    font-weight: 600;
    color: var(--primary-color);
}

.statistics-item .item-percentage {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-left: 0.5rem;
}

.chart-placeholder {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.chart-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .statistics-chart {
        min-height: 200px;
        padding: 1rem;
    }
    
    .statistics-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .statistics-filters select {
        min-width: auto;
    }
    
    .statistics-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .statistics-item .item-value {
        align-self: flex-end;
    }
}

[data-theme="dark"] .statistics-chart {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .statistics-list {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .statistics-item {
    border-color: var(--border-color);
}

[data-theme="dark"] .statistics-item .item-name {
    color: var(--text-primary);
}

[data-theme="dark"] .statistics-item .item-value {
    color: var(--primary-color);
}

[data-theme="dark"] .statistics-item .item-percentage {
    color: var(--text-secondary);
}

[data-theme="dark"] .chart-placeholder {
    color: var(--text-secondary);
}

/* Chart Styles */
.simple-chart {
    width: 100%;
    height: 100%;
}

.chart-bars {
    display: flex;
    align-items: end;
    justify-content: space-between;
    height: 200px;
    gap: 10px;
    padding: 20px 0;
}

.chart-bar {
    flex: 1;
    background: var(--primary-color);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    background: var(--primary-hover);
    transform: scaleY(1.05);
}

.chart-label {
    position: absolute;
    bottom: -25px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.chart-value {
    position: absolute;
    top: -25px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.device-chart {
    width: 100%;
}

.device-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 10px 0;
}

.device-label {
    min-width: 80px;
    font-weight: 500;
    color: var(--text-primary);
}

.device-bar-container {
    flex: 1;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.device-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

.device-value {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.countries-list {
    width: 100%;
}

@media (max-width: 768px) {
    .chart-bars {
        height: 150px;
        gap: 5px;
    }
    
    .chart-label {
        font-size: 0.7rem;
        bottom: -20px;
    }
    
    .chart-value {
        font-size: 0.7rem;
        top: -20px;
    }
    
    .device-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .device-label {
        min-width: auto;
    }
    
    .device-value {
        min-width: auto;
        align-self: flex-end;
    }
}

[data-theme="dark"] .chart-bar {
    background: var(--primary-color);
}

[data-theme="dark"] .chart-bar:hover {
    background: var(--primary-hover);
}

[data-theme="dark"] .chart-label {
    color: var(--text-secondary);
}

[data-theme="dark"] .chart-value {
    color: var(--primary-color);
}

[data-theme="dark"] .device-label {
    color: var(--text-primary);
}

[data-theme="dark"] .device-bar-container {
    background: var(--border-color);
}

[data-theme="dark"] .device-value {
    color: var(--primary-color);
}

/* Advanced Analytics Styles */
.heatmap-controls,
.journey-controls,
.events-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.heatmap-controls select,
.journey-controls select,
.events-controls select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 150px;
}

.heatmap-container,
.journey-container,
.events-container {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    min-height: 300px;
}

/* Heatmap Visualization */
.heatmap-visualization {
    width: 100%;
}

.heatmap-header {
    margin-bottom: 1rem;
    text-align: center;
}

.heatmap-header h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.heatmap-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.heatmap-grid {
    position: relative;
    width: 100%;
    height: 400px;
    background: linear-gradient(45deg, #f8fafc 25%, #ffffff 25%, #ffffff 50%, #f8fafc 50%, #f8fafc 75%, #ffffff 75%, #ffffff);
    background-size: 20px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.heatmap-point {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.heatmap-point:hover {
    transform: scale(1.2);
    border-color: white;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.legend-gradient {
    width: 150px;
    height: 12px;
    background: linear-gradient(to right, 
        rgba(34, 197, 94, 0.8),    /* Grün für wenige Klicks */
        rgba(245, 158, 11, 0.8),   /* Orange für mittlere Klicks */
        rgba(239, 68, 68, 0.9),    /* Rot für viele Klicks */
        rgba(220, 38, 38, 1)       /* Dunkelrot für sehr viele Klicks */
    );
    border-radius: 6px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Journey Visualization */
.journey-visualization {
    width: 100%;
}

.journey-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.journey-item {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: all 0.2s ease;
}

.journey-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.journey-length {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.journey-duration {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.journey-goal {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.journey-path {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.journey-device {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Events Visualization */
.events-visualization {
    width: 100%;
}

.event-group {
    margin-bottom: 1.5rem;
}

.event-group h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.event-time {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.event-page {
    color: var(--primary-color);
    font-weight: 500;
}

.event-element {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .heatmap-controls,
    .journey-controls,
    .events-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .heatmap-controls select,
    .journey-controls select,
    .events-controls select {
        min-width: auto;
    }
    
    .journey-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

[data-theme="dark"] .heatmap-container,
[data-theme="dark"] .journey-container,
[data-theme="dark"] .events-container {
    background: var(--surface-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .journey-item {
    background: var(--bg-color);
    border-color: var(--border-color);
}

[data-theme="dark"] .event-item {
    background: var(--bg-color);
} 

/* Dark Mode Support für Heatmap */
[data-theme="dark"] .heatmap-grid {
    background: linear-gradient(45deg, #1e293b 25%, #334155 25%, #334155 50%, #1e293b 50%, #1e293b 75%, #334155 75%, #334155);
    background-size: 20px 20px;
    border-color: var(--border-color);
}

[data-theme="dark"] .heatmap-point {
    border-color: rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .heatmap-point:hover {
    border-color: white;
}

[data-theme="dark"] .legend-gradient {
    border-color: var(--border-color);
} 